/*
-$Log$
-Revision 1.1 2003/01/23 19:45:58 brain
-Initial revision
-
-Revision 1.3 2003/01/17 13:21:38 brain
-Added CONNECT ALLOW and CONNECT DENY config tags
-Added PASS command
-
-Revision 1.2 2003/01/17 10:37:55 brain
-Added /INVITE command and relevent structures
-
-Revision 1.1 2003/01/16 01:10:04 brain
-forgot to add this
-
-
*/
#include "inspircd_config.h"
// the PROPER way to do it, AVOID bzero at *ALL* costs
strcpy(nick,"");
ip = 0;
+ timeout = 0;
strcpy(ident,"");
strcpy(host,"");
strcpy(dhost,"");
{
for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++)
{
- if (!strcasecmp(i->channel,channel))
- {
- return true;
+ if (i->channel) {
+ if (!strcasecmp(i->channel,channel))
+ {
+ return true;
+ }
}
}
+ return false;
}
void userrec::InviteTo(char* channel)
void userrec::RemoveInvite(char* channel)
{
- for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++)
- {
- if (!strcasecmp(i->channel,channel))
- {
- invites.erase(i);
- return;
- }
+ log(DEBUG,"Removing invites");
+ if (invites.size())
+ {
+ for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++)
+ {
+ if (i->channel) {
+ if (!strcasecmp(i->channel,channel))
+ {
+ invites.erase(i);
+ return;
+ }
+ }
+ }
}
}