// the PROPER way to do it, AVOID bzero at *ALL* costs
strcpy(nick,"");
ip = 0;
+ timeout = 0;
strcpy(ident,"");
strcpy(host,"");
strcpy(dhost,"");
invites.clear();
}
+
char* userrec::GetFullHost()
{
{
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;
+ }
+ }
+ }
}
}