]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/cmd_topic.cpp
Same tweak, again
[user/henk/code/inspircd.git] / src / cmd_topic.cpp
index f9abaa3092640a8425e70fa2c8ac04e5b812e114..06036fe010cf0d298356f90c7d8809e65007555e 100644 (file)
 #include "users.h"
 #include "modules.h"
 #include "commands/cmd_topic.h"
+#include "inspircd.h"
 
 
-
-extern "C" command_t* init_command(InspIRCd* Instance)
+extern "C" DllExport command_t* init_command(InspIRCd* Instance)
 {
        return new cmd_topic(Instance);
 }
@@ -95,7 +95,11 @@ CmdResult cmd_topic::Handle (const char** parameters, int pcnt, userrec *user)
                                strlcpy(Ptr->topic, parameters[1], MAXTOPIC-1);
                        }
 
-                       strlcpy(Ptr->setby,user->nick,NICKMAX-1);
+                       if (ServerInstance->Config->FullHostInTopic)
+                               strlcpy(Ptr->setby,user->GetFullHost(),127);
+                       else
+                               strlcpy(Ptr->setby,user->nick,127);
+
                        Ptr->topicset = ServerInstance->Time();
                        Ptr->WriteChannel(user, "TOPIC %s :%s", Ptr->name, Ptr->topic);