diff --git a/Changes b/Changes index 095abeab4..866099c15 100644 --- a/Changes +++ b/Changes @@ -1111,3 +1111,4 @@ v- Fixed some bugreport stuff - Made the kline-address error easier to understand (must be instead of is not) - Made a SNOMASK for the +s notices, so you arent forced into hearing them if you just want say +k +- Fixed some return values, can't gline masks with a ! in them anymore diff --git a/src/modules/m_mkpasswd.c b/src/modules/m_mkpasswd.c index 14b1abf18..8e7da0ce2 100644 --- a/src/modules/m_mkpasswd.c +++ b/src/modules/m_mkpasswd.c @@ -140,7 +140,7 @@ int m_mkpasswd(aClient *cptr, aClient *sptr, int parc, char *parv[]) sendto_one(sptr, ":%s NOTICE %s :*** Authentication method %s failed", me.name, sptr->name, parv[1]); - return; + return 0; } sendto_one(sptr, ":%s %s %s :*** Authentication phrase (method=%s, para=%s) is: %s", me.name, IsWebTV(sptr) ? "PRIVMSG" : "NOTICE", parv[0], parv[1], parv[2], result); diff --git a/src/modules/m_sdesc.c b/src/modules/m_sdesc.c index 4f02cb995..a76d6d425 100644 --- a/src/modules/m_sdesc.c +++ b/src/modules/m_sdesc.c @@ -115,15 +115,11 @@ int m_sdesc_Unload(int module_unload) int m_sdesc(aClient *cptr, aClient *sptr, int parc, char *parv[]) { - if (IsCoAdmin(sptr)) - goto sdescok; - /* ignoring */ - if (!IsAdmin(sptr)) - return; - sdescok: + if (!IsAdmin(sptr) && !IsCoAdmin(sptr)) + return 0; if (parc < 2) - return; + return 0; if (strlen(parv[1]) < 1) if (MyConnect(sptr)) diff --git a/src/modules/m_setident.c b/src/modules/m_setident.c index f746c0aaf..387925e95 100644 --- a/src/modules/m_setident.c +++ b/src/modules/m_setident.c @@ -229,5 +229,5 @@ DLLFUNC int m_setident(aClient *cptr, aClient *sptr, int parc, char *parv[]) IsHidden(sptr) ? sptr->user->virthost : sptr-> user->realhost); } - return; + return 0; } diff --git a/src/modules/m_setname.c b/src/modules/m_setname.c index c0f167f7e..3bf43fdf5 100644 --- a/src/modules/m_setname.c +++ b/src/modules/m_setname.c @@ -116,7 +116,7 @@ int m_setname_Unload(int module_unload) */ DLLFUNC int m_setname(aClient *cptr, aClient *sptr, int parc, char *parv[]) { if (parc < 2) - return; + return 0; if (strlen(parv[1]) > (REALLEN)) { if (MyConnect(sptr)) diff --git a/src/modules/m_tkl.c b/src/modules/m_tkl.c index d2975f62a..fd6692dfb 100644 --- a/src/modules/m_tkl.c +++ b/src/modules/m_tkl.c @@ -323,6 +323,13 @@ DLLFUNC int m_tkl_line(aClient *cptr, aClient *sptr, int parc, char *parv[], ch mask++; } + if (strchr(mask, '!')) + { + sendto_one(sptr, ":%s NOTICE %s :[error] Cannot have ! in masks.", me.name, + sptr->name); + return 0; + } + /* Check if its a hostmask and legal .. */ p = strchr(mask, '@'); diff --git a/src/modules/m_unsqline.c b/src/modules/m_unsqline.c index a60c64b5b..7a4eecb64 100644 --- a/src/modules/m_unsqline.c +++ b/src/modules/m_unsqline.c @@ -131,8 +131,5 @@ DLLFUNC int m_unsqline(aClient *cptr, aClient *sptr, int parc, char *parv[]) MyFree(bconf->reason); MyFree(bconf); } - else - return; - return 0; } diff --git a/src/modules/m_unzline.c b/src/modules/m_unzline.c index de84896eb..15608a8f7 100644 --- a/src/modules/m_unzline.c +++ b/src/modules/m_unzline.c @@ -181,7 +181,7 @@ DLLFUNC int m_unzline(aClient *cptr, aClient *sptr, int parc, char *parv[]) sendto_one(sptr, ":%s NOTICE %s :*** it's not possible to have a z:line that's not an ip addresss...", me.name, sptr->name); - return; + return 0; } in++; } @@ -197,7 +197,7 @@ DLLFUNC int m_unzline(aClient *cptr, aClient *sptr, int parc, char *parv[]) sendto_one(sptr, ":%s NOTICE %s :*** it's not possible to have a z:line that's not an ip addresss...", me.name, sptr->name); - return; + return 0; } in++; } diff --git a/src/modules/m_zline.c b/src/modules/m_zline.c index 01784d6db..1ae9a25a7 100644 --- a/src/modules/m_zline.c +++ b/src/modules/m_zline.c @@ -181,7 +181,7 @@ DLLFUNC int m_zline(aClient *cptr, aClient *sptr, int parc, char *parv[]) sendto_one(sptr, ":%s NOTICE %s :*** z:lines work only with ip addresses (you cannot specify ident either)", me.name, sptr->name); - return; + return 0; } in++; } @@ -205,7 +205,7 @@ DLLFUNC int m_zline(aClient *cptr, aClient *sptr, int parc, char *parv[]) sendto_one(sptr, ":%s NOTICE %s :*** z:lines work only with ip addresses (you cannot specify ident either)", me.name, sptr->name); - return; + return 0; } in++; } @@ -220,7 +220,7 @@ DLLFUNC int m_zline(aClient *cptr, aClient *sptr, int parc, char *parv[]) sendto_one(sptr, ":%s NOTICE %s :** *@%s is a bad z:line mask...", me.name, sptr->name, userhost); - return; + return 0; } if (!(bconf = Find_ban(userhost, CONF_BAN_IP)))