X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_callerid.cpp;h=c7ec7a4dbe93528a65fc4039d6a647d7e96f5d32;hb=de69e28a4a1aea89e410b693bbbb67890ecb0bd3;hp=cf60c084a4725a21b44bbf79239abae19ec3ddd2;hpb=67a4a9b62355ea57a2f4521ca5fc53bd4eac3a1f;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_callerid.cpp b/src/modules/m_callerid.cpp index cf60c084a..c7ec7a4db 100644 --- a/src/modules/m_callerid.cpp +++ b/src/modules/m_callerid.cpp @@ -18,7 +18,7 @@ /* $ModDesc: Implementation of callerid (umode +g & /accept, ala hybrid etc) */ -class callerid_data : public classbase +class callerid_data { public: time_t lastnotify; @@ -93,7 +93,7 @@ struct CallerIDExtInfo : public ExtensionItem callerid_data* get(User* user, bool create) { callerid_data* dat = static_cast(get_raw(user)); - if (!dat) + if (create && !dat) { dat = new callerid_data; set_raw(user, dat); @@ -389,7 +389,7 @@ public: if (now > (dat->lastnotify + (time_t)notify_cooldown)) { user->WriteNumeric(717, "%s %s :has been informed that you messaged them.", user->nick.c_str(), dest->nick.c_str()); - ServerInstance->DumpText(dest, ":%s 718 %s %s %s@%s :is messaging you, and you have umode +g. Use /ACCEPT +%s to allow.", + dest->SendText(":%s 718 %s %s %s@%s :is messaging you, and you have umode +g. Use /ACCEPT +%s to allow.", ServerInstance->Config->ServerName.c_str(), dest->nick.c_str(), user->nick.c_str(), user->ident.c_str(), user->dhost.c_str(), user->nick.c_str()); dat->lastnotify = now; }