diff options
| author | 2006-07-09 22:16:10 +0000 | |
|---|---|---|
| committer | 2006-07-09 22:16:10 +0000 | |
| commit | e7dfb988a41535faa021f5bf826112876bfacf2b (patch) | |
| tree | 096d0261c9022b23dcef931c2c063348204f0fb9 /src/commands.cpp | |
| parent | Someone put a { in here? (diff) | |
Spacify() function translates _ in opertypes to spaces (only when displayed, however)
git-svn-id: http://svn.inspircd.org/repository/branches/1_0_stable@4255 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/commands.cpp')
| -rw-r--r-- | src/commands.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/commands.cpp b/src/commands.cpp index 69a5ab306..73821f166 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -110,6 +110,17 @@ void split_chlist(userrec* user, userrec* dest, std::string &cl) } } +const char* Spacify(char* n) +{ + static char x[MAXBUF]; + strlcpy(x,n,MAXBUF); + for (char* y = x; *y; y++) + if (*y == '_') + *y = ' '; + return x; +} + + /* XXX - perhaps this should be in cmd_whois? -- w00t */ void do_whois(userrec* user, userrec* dest,unsigned long signon, unsigned long idle, char* nick) { @@ -147,7 +158,7 @@ void do_whois(userrec* user, userrec* dest,unsigned long signon, unsigned long i } if (*dest->oper) { - WriteServ(user->fd,"313 %s %s :is %s %s on %s",user->nick, dest->nick, (strchr("AEIOUaeiou",*dest->oper) ? "an" : "a"),dest->oper, Config->Network); + WriteServ(user->fd,"313 %s %s :is %s %s on %s",user->nick, dest->nick, (strchr("AEIOUaeiou",*dest->oper) ? "an" : "a"),Spacify(dest->oper), Config->Network); } if ((!signon) && (!idle)) { |
