diff options
| author | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-12-17 02:10:35 +0000 |
|---|---|---|
| committer | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-12-17 02:10:35 +0000 |
| commit | 861fe9e7b32c8e1e523cc774547e460c9ed67289 (patch) | |
| tree | b821f00ef784751ff7c43771175b818fec4645bb /src/protocol/unreal32.c | |
| parent | 453963eeaeb4232df3e331522408034606cfefd6 (diff) | |
Added BotInfo* sender arg to all of the User mode functions, changed IRcdProto::SendMode for channels to accept a Channel pointer and fixed unsetting users vhosts on Unreal
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2710 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/protocol/unreal32.c')
| -rw-r--r-- | src/protocol/unreal32.c | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/src/protocol/unreal32.c b/src/protocol/unreal32.c index fb52d3129..7dc55a452 100644 --- a/src/protocol/unreal32.c +++ b/src/protocol/unreal32.c @@ -186,9 +186,12 @@ class UnrealIRCdProto : public IRCDProto void SendVhostDel(User *u) { - u->RemoveMode(UMODE_CLOAK); - u->RemoveMode(UMODE_VHOST); - u->SetMode(UMODE_CLOAK); + BotInfo *bi = findbot(Config.s_HostServ); + u->RemoveMode(bi, UMODE_CLOAK); + u->RemoveMode(bi, UMODE_VHOST); + ModeManager::ProcessModes(); + u->SetMode(bi, UMODE_CLOAK); + ModeManager::ProcessModes(); } void SendAkill(Akill *ak) @@ -215,20 +218,20 @@ class UnrealIRCdProto : public IRCDProto { if (ac >= 1) { if (!u || !av[0]) return; - this->SendModeInternal(u, merge_args(ac, av)); + this->SendModeInternal(NULL, u, merge_args(ac, av)); } } - void SendModeInternal(BotInfo *source, const char *dest, const char *buf) + void SendModeInternal(BotInfo *source, Channel *dest, const char *buf) { if (!buf) return; - send_cmd(source->nick, "G %s %s", dest, buf); + send_cmd(source->nick, "G %s %s", dest->name, buf); } - void SendModeInternal(User *u, const char *buf) + void SendModeInternal(BotInfo *bi, User *u, const char *buf) { if (!buf) return; - send_cmd(Config.ServerName, "v %s %s", u->nick, buf); + send_cmd(bi ? bi->nick : Config.ServerName, "v %s %s", u->nick, buf); } void SendClientIntroduction(const char *nick, const char *user, const char *host, const char *real, const char *modes, const char *uid) @@ -462,14 +465,16 @@ class UnrealIRCdProto : public IRCDProto u->nc->Extend("authenticationtoken", sstrdup(svidbuf)); - u->SetMode(UMODE_REGISTERED); - ircdproto->SendMode(u, "+d %s", svidbuf); + BotInfo *bi = findbot(Config.s_NickServ); + u->SetMode(bi, UMODE_REGISTERED); + ircdproto->SendMode(bi, u, "+d %s", svidbuf); } void SendUnregisteredNick(User *u) { - u->RemoveMode(UMODE_REGISTERED); - ircdproto->SendMode(u, "+d 1"); + BotInfo *bi = findbot(Config.s_NickServ); + u->RemoveMode(bi, UMODE_REGISTERED); + ircdproto->SendMode(bi, u, "+d 1"); } } ircd_proto; |
