summaryrefslogtreecommitdiff
path: root/src/mode.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-02-06 22:52:04 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-02-06 22:52:04 +0000
commit3c45907c621f9f93d27c3ae7d2f26a9ba99b1c12 (patch)
tree3dd0eb56d52becbb0c3e17931e60f00efbd9bfbb /src/mode.cpp
parent4341f4b5e6e7024b38fdc75b1acd9956fa70f604 (diff)
Allow remote bans from servers to be represented as servers in the banlist
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3113 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/mode.cpp')
-rw-r--r--src/mode.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mode.cpp b/src/mode.cpp
index 60df3e7d8..7909aad38 100644
--- a/src/mode.cpp
+++ b/src/mode.cpp
@@ -451,7 +451,14 @@ char* ModeParser::AddBan(userrec *user,char *dest,chanrec *chan,int status)
b.set_time = TIME;
strlcpy(b.data,dest,MAXBUF);
- strlcpy(b.set_by,user->nick,NICKMAX);
+ if (*user->nick)
+ {
+ strlcpy(b.set_by,user->nick,NICKMAX);
+ }
+ else
+ {
+ strlcpy(b.set_by,Srv->GetServerName().c_str(),NICKMAX);
+ }
chan->bans.push_back(b);
return dest;
}