summaryrefslogtreecommitdiff
path: root/src/botserv.c
diff options
context:
space:
mode:
authorrburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864>2009-02-09 21:01:05 +0000
committerrburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864>2009-02-09 21:01:05 +0000
commitd7d01bdc5c667a1fafd95241282b58e03b4caa5b (patch)
treef1482d8734da609923c6d8af6bc8fcb0fc187534 /src/botserv.c
parentd49b3a25fda5f597491e73640dd1e76babc240eb (diff)
Squashed commit: merge next (1.9.1) back to trunk.
SVN users, NOTE: THIS WILL NOT BUILD, NOR SHOULD YOU RUN IT YET. git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1953 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/botserv.c')
-rw-r--r--src/botserv.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/botserv.c b/src/botserv.c
index e671006e2..96b017bcd 100644
--- a/src/botserv.c
+++ b/src/botserv.c
@@ -421,14 +421,22 @@ void botchanmsgs(User * u, ChannelInfo * ci, char *buf)
/* Strip off the fantasy character */
cmd++;
- if (check_access(u, ci, CA_FANTASIA))
+ if (check_access(u, ci, CA_FANTASIA))
+ {
+ std::string bbuf = std::string(cmd) + " " + ci->name;
+ if (params)
+ {
+ bbuf += " ";
+ bbuf += params;
+ }
+ chanserv(u, const_cast<char *>(bbuf.c_str())); // XXX Unsafe cast, this needs reviewing -- CyberBotX
event_name = EVENT_BOT_FANTASY;
+ }
if (params)
send_event(event_name, 4, cmd, u->nick, ci->name, params);
else
- send_event(event_name, 3, cmd, u->nick, ci->name);
- }
+ send_event(event_name, 3, cmd, u->nick, ci->name);}
}
}
@@ -596,8 +604,8 @@ static BanData *get_ban_data(Channel * c, User * u)
if (!c || !u)
return NULL;
- snprintf(mask, sizeof(mask), "%s@%s", u->username,
- common_get_vhost(u));
+ snprintf(mask, sizeof(mask), "%s@%s", u->GetIdent().c_str(),
+ u->GetDisplayedHost().c_str());
for (bd = c->bd; bd; bd = next) {
if (now - bd->last_use > BSKeepData) {