* | Inspire Internet Relay Chat Daemon |
* +------------------------------------+
*
- * Inspire is copyright (C) 2002-2004 ChatSpike-Dev.
+ * InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev.
* E-mail:
* <brain@chatspike.net>
* <Craig@chatspike.net>
time_t parktime;
};
-Server *Srv;
+static Server *Srv;
typedef std::vector<awaymsg> awaylog;
typedef std::vector<parkedinfo> parkinfo;
parkinfo pinfo;
* We then disconnect the real user leaving a controlled ghost in their place :)
*/
int othersessions = 0;
+ /* XXX - why can't just use pinfo.size() like we do below, rather than iterating over the whole vector? -- w00t */
if (pinfo.size())
for (parkinfo::iterator j = pinfo.begin(); j != pinfo.end(); j++)
if (j->host == std::string(user->host))
if (key == atoi(parameters[1]))
{
// first part the user from all chans theyre on, so things dont get messy
- for (unsigned int i = 0; i < user->chans.size(); i++)
+ for (std::vector<ucrec*>::iterator i = user->chans.begin(); i != user->chans.end(); i++)
{
- if (user->chans[i].channel != NULL)
- {
- if (user->chans[i].channel->name)
- {
- Srv->PartUserFromChannel(user,user->chans[i].channel->name,"Unparking");
- }
+ if (((ucrec*)(*i))->channel != NULL)
+ {
+ Srv->PartUserFromChannel(user,((ucrec*)(*i))->channel->name,"Unparking");
}
}
// remove all their old modes
{
// track nickchanges in our parked user list
// (this isnt too efficient, i'll tidy it up some time)
+ /* XXX - perhaps extend the user record, or, that wouldn't work - perhaps use a map? -- w00t */
for (parkinfo::iterator j = pinfo.begin(); j != pinfo.end(); j++)
{
if (j->nick == std::string(user->nick))
}
}
- virtual int OnUserPreMessage(userrec* user,void* dest,int target_type, std::string &text)
+ /* XXX - why is OnPrePrivmsg seperated here, I assume there is reason for the extra function call? --w00t */
+ virtual int OnUserPreMessage(userrec* user,void* dest,int target_type, std::string &text, char status)
{
if (target_type == TYPE_USER)
{