summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
}