X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_customtitle.cpp;h=613de59389aaf4c0674d84dd802156f2513fcb86;hb=551d687ec6d7ce44be35fae0dd7345fe73c4f63a;hp=efe4b32470b4ee4ca47d98840bf2ce4d3a0e9f26;hpb=d31e6e1f3e9a52e23134525b26912f0ebd4f27c0;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_customtitle.cpp b/src/modules/m_customtitle.cpp index efe4b3247..613de5938 100644 --- a/src/modules/m_customtitle.cpp +++ b/src/modules/m_customtitle.cpp @@ -55,7 +55,7 @@ class CommandTitle : public Command char TheIP[MAXBUF]; snprintf(TheHost,MAXBUF,"%s@%s",user->ident.c_str(), user->host.c_str()); - snprintf(TheIP, MAXBUF,"%s@%s",user->ident.c_str(), user->GetIPString()); + snprintf(TheIP, MAXBUF,"%s@%s",user->ident.c_str(), user->GetIPString().c_str()); ConfigTagList tags = ServerInstance->Config->ConfTags("title"); for (ConfigIter i = tags.first; i != tags.second; ++i) @@ -95,8 +95,12 @@ class ModuleCustomTitle : public Module public: ModuleCustomTitle() : cmd(this) { - ServerInstance->AddCommand(&cmd); - ServerInstance->Extensions.Register(&cmd.ctitle); + } + + void init() + { + ServerInstance->Modules->AddService(cmd); + ServerInstance->Modules->AddService(cmd.ctitle); ServerInstance->Modules->Attach(I_OnWhoisLine, this); } @@ -117,10 +121,6 @@ class ModuleCustomTitle : public Module return MOD_RES_PASSTHRU; } - ~ModuleCustomTitle() - { - } - Version GetVersion() { return Version("Custom Title for users", VF_OPTCOMMON | VF_VENDOR);