#include "helperfuncs.h"
#include "message.h"
-Server *Srv;
+static Server *Srv;
class cmd_uninvite : public command_t
{
WriteServ(user->fd,"491 %s %s %s :Is not invited to channel %s",user->nick,u->nick,c->name,c->name);
return;
}
- if (has_channel(user,c))
+ if (!c->HasUser(user))
{
WriteServ(user->fd,"492 %s %s :You're not on that channel!",user->nick, c->name);
return;
}
u->RemoveInvite(xname);
- WriteServ(user->fd,"NOTICE %s :*** Uninvited %s from %s",user->nick,u->nick,c->name);
+ WriteServ(user->fd,"494 %s %s %s :Uninvited",user->nick,c->name,u->nick);
+ WriteServ(u->fd,"493 %s :You were uninvited from %s by %s",u->nick,c->name,user->nick);
WriteChannel(c,user,"NOTICE %s :*** %s uninvited %s.",c->name,user->nick,u->nick);
}
};
virtual Version GetVersion()
{
- return Version(1, 0, 0, 0, VF_VENDOR);
+ /* Must be static, because we dont want to desync invite lists */
+ return Version(1, 0, 0, 0, VF_VENDOR|VF_STATIC);
}
};