From 1af394d68bd6eb328a561acd9468fe272842c409 Mon Sep 17 00:00:00 2001 From: w00t Date: Sat, 9 Feb 2008 19:51:52 +0000 Subject: Implement bug #492: empty swhois string unsets swhois. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8862 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_swhois.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/modules/m_swhois.cpp') 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; } -- cgit v1.2.3