summaryrefslogtreecommitdiff
path: root/src/chanserv.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/chanserv.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/chanserv.c')
-rw-r--r--src/chanserv.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/chanserv.c b/src/chanserv.c
index eff790d49..ee3b96e97 100644
--- a/src/chanserv.c
+++ b/src/chanserv.c
@@ -1197,7 +1197,7 @@ int check_kick(User * user, const char *chan, time_t chants)
kick:
if (debug)
alog("debug: channel: AutoKicking %s!%s@%s from %s", user->nick,
- user->username, user->host, chan);
+ user->GetIdent().c_str(), user->host, chan);
/* Remember that the user has not been added to our channel user list
* yet, so we check whether the channel does not exist OR has no user
@@ -1968,22 +1968,24 @@ int get_idealban(ChannelInfo * ci, User * u, char *ret, int retlen)
if (!ci || !u || !ret || retlen == 0)
return 0;
+ std::string vident = u->GetIdent();
+
switch (ci->bantype) {
case 0:
- snprintf(ret, retlen, "*!%s@%s", common_get_vident(u),
- common_get_vhost(u));
+ snprintf(ret, retlen, "*!%s@%s", vident.c_str(),
+ u->GetDisplayedHost().c_str());
return 1;
case 1:
- snprintf(ret, retlen, "*!%s%s@%s",
- (strlen(common_get_vident(u)) <
- (*(common_get_vident(u)) ==
- '~' ? USERMAX + 1 : USERMAX) ? "*" : ""),
- (*(common_get_vident(u)) ==
- '~' ? common_get_vident(u) + 1 : common_get_vident(u)),
- common_get_vhost(u));
+ if (vident[0] == '~')
+ snprintf(ret, retlen, "*!*%s@%s",
+ vident.c_str(), u->GetDisplayedHost().c_str());
+ else
+ snprintf(ret, retlen, "*!%s@%s",
+ vident.c_str(), u->GetDisplayedHost().c_str());
+
return 1;
case 2:
- snprintf(ret, retlen, "*!*@%s", common_get_vhost(u));
+ snprintf(ret, retlen, "*!*@%s", u->GetDisplayedHost().c_str());
return 1;
case 3:
mask = create_mask(u);