diff options
| author | Adam <Adam@anope.org> | 2010-06-27 02:41:48 -0400 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2010-06-27 02:41:48 -0400 |
| commit | 57caa0b53f53927c72811ffffda8bb527975860f (patch) | |
| tree | 7fef9b12d2d86758acb9198001f88f072e8a31d6 /src/protocol/inspircd12.cpp | |
| parent | d49aee6cf88c79220eb785245257544c8051247f (diff) | |
Made Anope track its own clients internally as if they were real users
Diffstat (limited to 'src/protocol/inspircd12.cpp')
| -rw-r--r-- | src/protocol/inspircd12.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/protocol/inspircd12.cpp b/src/protocol/inspircd12.cpp index 9b742e64e..1746bdc57 100644 --- a/src/protocol/inspircd12.cpp +++ b/src/protocol/inspircd12.cpp @@ -99,7 +99,7 @@ void inspircd_cmd_chghost(const char *nick, const char *vhost) } BotInfo *bi = OperServ; - send_cmd(bi->uid, "CHGHOST %s %s", nick, vhost); + send_cmd(bi->GetUID(), "CHGHOST %s %s", nick, vhost); } int anope_event_idle(const char *source, int ac, const char **av) @@ -108,7 +108,7 @@ int anope_event_idle(const char *source, int ac, const char **av) if (!bi) return MOD_CONT; - send_cmd(bi->uid, "IDLE %s %ld %ld", source, static_cast<long>(start_time), static_cast<long>(time(NULL) - bi->lastmsg)); + send_cmd(bi->GetUID(), "IDLE %s %ld %ld", source, static_cast<long>(start_time), static_cast<long>(time(NULL) - bi->lastmsg)); return MOD_CONT; } @@ -126,12 +126,12 @@ class InspIRCdProto : public IRCDProto void SendAkillDel(XLine *x) { BotInfo *bi = OperServ; - send_cmd(bi->uid, "GLINE %s", x->Mask.c_str()); + send_cmd(bi->GetUID(), "GLINE %s", x->Mask.c_str()); } void SendTopic(BotInfo *whosets, Channel *c, const char *whosetit, const char *topic) { - send_cmd(whosets->uid, "FTOPIC %s %lu %s :%s", c->name.c_str(), static_cast<unsigned long>(c->topic_time), whosetit, topic); + send_cmd(whosets->GetUID(), "FTOPIC %s %lu %s :%s", c->name.c_str(), static_cast<unsigned long>(c->topic_time), whosetit, topic); } void SendVhostDel(User *u) @@ -154,12 +154,12 @@ class InspIRCdProto : public IRCDProto if (timeleft > 172800 || !x->Expires) timeleft = 172800; BotInfo *bi = OperServ; - send_cmd(bi->uid, "ADDLINE G %s@%s %s %ld %ld :%s", x->GetUser().c_str(), x->GetHost().c_str(), x->By.c_str(), static_cast<long>(time(NULL)), static_cast<long>(timeleft), x->Reason.c_str()); + send_cmd(bi->GetUID(), "ADDLINE G %s@%s %s %ld %ld :%s", x->GetUser().c_str(), x->GetHost().c_str(), x->By.c_str(), static_cast<long>(time(NULL)), static_cast<long>(timeleft), x->Reason.c_str()); } void SendSVSKillInternal(BotInfo *source, User *user, const char *buf) { - send_cmd(source ? source->uid : TS6SID, "KILL %s :%s", user->GetUID().c_str(), buf); + send_cmd(source ? source->GetUID() : TS6SID, "KILL %s :%s", user->GetUID().c_str(), buf); } void SendSVSMode(User *u, int ac, const char **av) @@ -179,13 +179,13 @@ class InspIRCdProto : public IRCDProto void SendModeInternal(BotInfo *source, Channel *dest, const char *buf) { - send_cmd(source ? source->uid : TS6SID, "FMODE %s %u %s", dest->name.c_str(), static_cast<unsigned>(dest->creation_time), buf); + send_cmd(source ? source->GetUID() : TS6SID, "FMODE %s %u %s", dest->name.c_str(), static_cast<unsigned>(dest->creation_time), buf); } void SendModeInternal(BotInfo *bi, User *u, const char *buf) { if (!buf) return; - send_cmd(bi ? bi->uid : TS6SID, "MODE %s %s", u->GetUID().c_str(), buf); + send_cmd(bi ? bi->GetUID() : TS6SID, "MODE %s %s", u->GetUID().c_str(), buf); } void SendClientIntroduction(const std::string &nick, const std::string &user, const std::string &host, const std::string &real, const char *modes, const std::string &uid) @@ -196,9 +196,9 @@ class InspIRCdProto : public IRCDProto void SendKickInternal(BotInfo *source, Channel *chan, User *user, const char *buf) { if (buf) - send_cmd(source->uid, "KICK %s %s :%s", chan->name.c_str(), user->GetUID().c_str(), buf); + send_cmd(source->GetUID(), "KICK %s %s :%s", chan->name.c_str(), user->GetUID().c_str(), buf); else - send_cmd(source->uid, "KICK %s %s :%s", chan->name.c_str(), user->GetUID().c_str(), user->nick.c_str()); + send_cmd(source->GetUID(), "KICK %s %s :%s", chan->name.c_str(), user->GetUID().c_str(), user->nick.c_str()); } void SendNoticeChanopsInternal(BotInfo *source, Channel *dest, const char *buf) @@ -215,7 +215,7 @@ class InspIRCdProto : public IRCDProto /* JOIN */ void SendJoin(BotInfo *user, const char *channel, time_t chantime) { - send_cmd(TS6SID, "FJOIN %s %ld + :,%s", channel, static_cast<long>(chantime), user->uid.c_str()); + send_cmd(TS6SID, "FJOIN %s %ld + :,%s", channel, static_cast<long>(chantime), user->GetUID().c_str()); } /* UNSQLINE */ @@ -265,7 +265,7 @@ class InspIRCdProto : public IRCDProto else { BotInfo *bi = OperServ; - send_cmd(bi->uid, "CHGIDENT %s %s", nick, vIdent); + send_cmd(bi->GetUID(), "CHGIDENT %s %s", nick, vIdent); } } @@ -273,14 +273,14 @@ class InspIRCdProto : public IRCDProto void SendSVSHold(const char *nick) { BotInfo *bi = OperServ; - send_cmd(bi->uid, "SVSHOLD %s %u :%s", nick, static_cast<unsigned>(Config.NSReleaseTimeout), "Being held for registered user"); + send_cmd(bi->GetUID(), "SVSHOLD %s %u :%s", nick, static_cast<unsigned>(Config.NSReleaseTimeout), "Being held for registered user"); } /* SVSHOLD - release */ void SendSVSHoldDel(const char *nick) { BotInfo *bi = OperServ; - send_cmd(bi->uid, "SVSHOLD %s", nick); + send_cmd(bi->GetUID(), "SVSHOLD %s", nick); } /* UNSZLINE */ @@ -305,14 +305,14 @@ class InspIRCdProto : public IRCDProto { User *u = finduser(nick); BotInfo *bi = findbot(source); - send_cmd(bi->uid, "SVSJOIN %s %s", u->GetUID().c_str(), chan); + send_cmd(bi->GetUID(), "SVSJOIN %s %s", u->GetUID().c_str(), chan); } void SendSVSPart(const char *source, const char *nick, const char *chan) { User *u = finduser(nick); BotInfo *bi = findbot(source); - send_cmd(bi->uid, "SVSPART %s %s", u->GetUID().c_str(), chan); + send_cmd(bi->GetUID(), "SVSPART %s %s", u->GetUID().c_str(), chan); } void SendSWhois(const char *source, const char *who, const char *mask) @@ -330,9 +330,9 @@ class InspIRCdProto : public IRCDProto void SendGlobopsInternal(BotInfo *source, const char *buf) { if (has_globopsmod) - send_cmd(source ? source->uid : TS6SID, "SNONOTICE g :%s", buf); + send_cmd(source ? source->GetUID() : TS6SID, "SNONOTICE g :%s", buf); else - send_cmd(source ? source->uid : TS6SID, "SNONOTICE A :%s", buf); + send_cmd(source ? source->GetUID() : TS6SID, "SNONOTICE A :%s", buf); } void SendAccountLogin(User *u, NickCore *account) @@ -505,8 +505,8 @@ int anope_event_fjoin(const char *source, int ac, const char **av) /* Rejoin the bot to fix the TS */ if (c->ci->bi) { - ircdproto->SendPart(c->ci->bi, c, "TS reop"); - bot_join(c->ci); + c->ci->bi->Part(c, "TS reop"); + c->ci->bi->Join(c); } /* Reset mlock */ check_modes(c); |
