summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-02-09 19:51:52 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-02-09 19:51:52 +0000
commit1af394d68bd6eb328a561acd9468fe272842c409 (patch)
tree121ff50280baa41c2be93993cb8848f8379cc9a7
parenta969da5decb5855ca1c3a4ba4a4b4dfafb157e32 (diff)
Implement bug #492: empty swhois string unsets swhois.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8862 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/modules/m_swhois.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/modules/m_swhois.cpp b/src/modules/m_swhois.cpp
index 6d813ae9a..9ebbb2a08 100644
--- a/src/modules/m_swhois.cpp
+++ b/src/modules/m_swhois.cpp
@@ -59,7 +59,6 @@ class CommandSwhois : public Command
if (text)
{
// We already had it set...
-
if (!ServerInstance->ULine(user->server))
// Ulines set SWHOISes silently
ServerInstance->SNO->WriteToSnoMask('A', "%s used SWHOIS to set %s's extra whois from '%s' to '%s'", user->nick, dest->nick, text->c_str(), line.c_str());
@@ -89,6 +88,13 @@ class CommandSwhois : public Command
Event event((char*)metadata,(Module*)this,"send_metadata");
event.Send(ServerInstance);
delete metadata;
+
+ // If it's an empty swhois, unset it (not ideal, but ok)
+ if (text.empty())
+ {
+ dest->Shrink("swhois");
+ delete text;
+ }
return CMD_LOCALONLY;
}