diff options
author | rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b <rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2006-06-25 18:07:48 +0000 |
---|---|---|
committer | rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b <rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2006-06-25 18:07:48 +0000 |
commit | 90252bbeccbfde0e28a13b58edb463d3b6463b8f (patch) | |
tree | 5e110ea417237ddac9edde5592d12c9959ef7a06 | |
parent | 74cc91636ab415177f58f8408e649023c593c0be (diff) |
BUILD : 1.7.14 (1073) BUGS : N/A NOTES : Added a string privmsg option, which can force services to only accept /msg nick@host
git-svn-id: svn://svn.anope.org/anope/trunk@1073 31f1291d-b8d6-0310-a050-a5561fc1590b
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@797 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r-- | Changes | 1 | ||||
-rw-r--r-- | Changes.conf | 8 | ||||
-rw-r--r-- | Changes.lang | 1 | ||||
-rw-r--r-- | data/example.conf | 8 | ||||
-rw-r--r-- | include/extern.h | 1 | ||||
-rw-r--r-- | lang/cat.l | 2 | ||||
-rw-r--r-- | lang/de.l | 2 | ||||
-rw-r--r-- | lang/en_us.l | 2 | ||||
-rw-r--r-- | lang/es.l | 2 | ||||
-rw-r--r-- | lang/fr.l | 2 | ||||
-rw-r--r-- | lang/gr.l | 2 | ||||
-rw-r--r-- | lang/hun.l | 2 | ||||
-rw-r--r-- | lang/it.l | 2 | ||||
-rw-r--r-- | lang/nl.l | 2 | ||||
-rw-r--r-- | lang/pl.l | 2 | ||||
-rw-r--r-- | lang/pt.l | 2 | ||||
-rw-r--r-- | lang/ru.l | 2 | ||||
-rw-r--r-- | lang/tr.l | 2 | ||||
-rw-r--r-- | src/config.c | 2 | ||||
-rw-r--r-- | src/messages.c | 8 | ||||
-rw-r--r-- | version.log | 6 |
21 files changed, 59 insertions, 2 deletions
@@ -6,6 +6,7 @@ Provided by Anope Dev. <dev@anope.org> - 2006 06/22 A Ability for ircd modules to set extra modes on id. [ #00] 06/22 A Support startup flag. [ #00] 06/21 A Module version check. [ #00] +06/25 A Optional strict privmsg format. [ #00] 04/08 F Fixed Charybdis support on win32. [#487] 04/08 F Fixed thread stuff on windows. [#488] 04/08 F Fixed SGLine stuff on inspircd (not supported). [#489] diff --git a/Changes.conf b/Changes.conf index 5a34749cf..a4936a2f5 100644 --- a/Changes.conf +++ b/Changes.conf @@ -1,6 +1,14 @@ Anope Version S V N -------------------- ** ADDED CONFIGURATION DIRECTIVES ** +# UseStrictPrivMsg [OPTIONAL] +# Using this directive will force services to only respond to privmsgs +# addressed to Nick@ServerName - e.g. NickServ@localhost.net. +# This should be used on conjunction with ircd aliases. +# + +#UseStrictPrivMsg + # NSResendDelay <time> [RECOMMENDED] # Sets the minimum length of time between consecutive uses of the # RESEND command. If not given, this restriction is disabled (note diff --git a/Changes.lang b/Changes.lang index 661741e70..bf8c6527b 100644 --- a/Changes.lang +++ b/Changes.lang @@ -1,6 +1,7 @@ Anope Version S V N -------------------- *** New Strings: + INVALID_TARGET *** Mod Strings: diff --git a/data/example.conf b/data/example.conf index 68d468f13..0b06632e1 100644 --- a/data/example.conf +++ b/data/example.conf @@ -472,6 +472,14 @@ ForceForbidReason #UsePrivmsg +# UseStrictPrivMsg [OPTIONAL] +# Using this directive will force services to only respond to privmsgs +# addressed to Nick@ServerName - e.g. NickServ@localhost.net. +# This should be used on conjunction with ircd aliases. +# + +#UseStrictPrivMsg + # DumpCore [OPTIONAL] # # Setting this directive will make Anope dump core when a segmentation diff --git a/include/extern.h b/include/extern.h index f35846d36..9cad26552 100644 --- a/include/extern.h +++ b/include/extern.h @@ -323,6 +323,7 @@ E int KeepLogs; E int KeepBackups; E int ForceForbidReason; E int UsePrivmsg; +E int UseStrictPrivMsg; E int DumpCore; E int LogUsers; E int NickRegDelay; diff --git a/lang/cat.l b/lang/cat.l index e97e9b5d6..bfac46693 100644 --- a/lang/cat.l +++ b/lang/cat.l @@ -165,6 +165,8 @@ READ_ONLY_MODE Noticia: Els serveis estan en mode read-only; Els canvis no seran guardats! PASSWORD_INCORRECT Clau incorrecta. +INVALID_TARGET + "/msg %s" is no longer supported. Use "/msg %s@%s" or "/%s" instead. # What's the difference between "Access denied" and "Permission denied"? # Very little; you can safely make them the same message with no real loss @@ -183,6 +183,8 @@ READ_ONLY_MODE PASSWORD_INCORRECT Falsches Passwort. +INVALID_TARGET + "/msg %s" is no longer supported. Use "/msg %s@%s" or "/%s" instead. # What's the difference between "Access denied" and "Permission denied"? # Very little; you can safely make them the same message with no real loss diff --git a/lang/en_us.l b/lang/en_us.l index f9acb49fa..5aae18c2d 100644 --- a/lang/en_us.l +++ b/lang/en_us.l @@ -164,6 +164,8 @@ READ_ONLY_MODE Notice: Services is in read-only mode; changes will not be saved! PASSWORD_INCORRECT Password incorrect. +INVALID_TARGET + "/msg %s" is no longer supported. Use "/msg %s@%s" or "/%s" instead. # What's the difference between "Access denied" and "Permission denied"? # Very little; you can safely make them the same message with no real loss @@ -164,6 +164,8 @@ READ_ONLY_MODE Noticia: Los Servicios estan en modo read-only; Los cambios no seran salvados! PASSWORD_INCORRECT Clave incorrecta. +INVALID_TARGET + "/msg %s" is no longer supported. Use "/msg %s@%s" or "/%s" instead. # What's the difference between "Access denied" and "Permission denied"? # Very little; you can safely make them the same message with no real loss @@ -170,6 +170,8 @@ READ_ONLY_MODE Note: les Services sont en mode lecture-seule; les changements ne seront pas sauvegardés! PASSWORD_INCORRECT Mot de passe incorrect. +INVALID_TARGET + "/msg %s" is no longer supported. Use "/msg %s@%s" or "/%s" instead. # What's the difference between "Access denied" and "Permission denied"? # Very little; you can safely make them the same message with no real loss @@ -164,6 +164,8 @@ READ_ONLY_MODE Óçìåßùóç: Ïé õðçñåóßåò åßíáé ìüíï áíáãíþóéìåò; ïé üðïéåò áëëáãÝò Ýãéíáí èá ÷áèïýí! PASSWORD_INCORRECT ËÜèïò êùäéêüò. +INVALID_TARGET + "/msg %s" is no longer supported. Use "/msg %s@%s" or "/%s" instead. # What's the difference between "Access denied" and "Permission denied"? # Very little; you can safely make them the same message with no real loss diff --git a/lang/hun.l b/lang/hun.l index 7dc1ca438..04a7c575e 100644 --- a/lang/hun.l +++ b/lang/hun.l @@ -172,6 +172,8 @@ READ_ONLY_MODE Megjegyzés: A Szervíz csak olvasás módban fut! PASSWORD_INCORRECT Hibás jelszó. +INVALID_TARGET + "/msg %s" is no longer supported. Use "/msg %s@%s" or "/%s" instead. # Mi a különbség a "Hozzáférés megtagadva" és az "Engedély letiltva" között? # Nagyon kicsi; ha ugyanazt az üzenetet írod mindkettõre, nem igazán veszít @@ -166,6 +166,8 @@ READ_ONLY_MODE Nota: i Services sono in modalità read-only; le modifiche non saranno salvate! PASSWORD_INCORRECT Password errata. +INVALID_TARGET + "/msg %s" is no longer supported. Use "/msg %s@%s" or "/%s" instead. # What's the difference between "Access denied" and "Permission denied"? # Very little; you can safely make them the same message with no real loss @@ -166,6 +166,8 @@ READ_ONLY_MODE Let op: Services zijn in alleen-lezen mode; veranderingen worden niet opgeslagen! PASSWORD_INCORRECT Wachtwoord incorrect. +INVALID_TARGET + "/msg %s" is no longer supported. Use "/msg %s@%s" or "/%s" instead. # What's the difference between "Access denied" and "Permission denied"? # Very little; you can safely make them the same message with no real loss @@ -178,6 +178,8 @@ READ_ONLY_MODE odczytu - zmiany nie bêd± zapisywane! PASSWORD_INCORRECT Nieprawid³owe has³o. +INVALID_TARGET + "/msg %s" is no longer supported. Use "/msg %s@%s" or "/%s" instead. # What's the difference between "Access denied" and "Permission denied"? # Very little; you can safely make them the same message with no real loss @@ -174,6 +174,8 @@ READ_ONLY_MODE Atenção: Os services estão no modo somente leitura; as mudanças não serão salvas! PASSWORD_INCORRECT Senha incorreta. +INVALID_TARGET + "/msg %s" is no longer supported. Use "/msg %s@%s" or "/%s" instead. # What's the difference between "Access denied" and "Permission denied"? # Very little; you can safely make them the same message with no real loss @@ -170,6 +170,8 @@ READ_ONLY_MODE Ïðèìå÷àíèå: ñåé÷àñ ñåðâèñû ðàáîòàþò â ðåæèìå òîëüêî-÷òåíèå; èçìåíåíèÿ ÍÅ áóäóò ñîõðàíåíû! PASSWORD_INCORRECT Íåâåðíûé ïàðîëü. +INVALID_TARGET + "/msg %s" is no longer supported. Use "/msg %s@%s" or "/%s" instead. # What's the difference between "Access denied" and "Permission denied"? # Very little; you can safely make them the same message with no real loss @@ -168,6 +168,8 @@ READ_ONLY_MODE Not: Servisler read-only modunda; deðiþiklikler kaydedilmeyecektir! PASSWORD_INCORRECT Þifre geçersiz. +INVALID_TARGET + "/msg %s" is no longer supported. Use "/msg %s@%s" or "/%s" instead. # What's the difference between "Access denied" and "Permission denied"? # Very little; you can safely make them the same message with no real loss diff --git a/src/config.c b/src/config.c index d8e05a157..9c7c34670 100644 --- a/src/config.c +++ b/src/config.c @@ -113,6 +113,7 @@ int KeepLogs; int KeepBackups; int ForceForbidReason; int UsePrivmsg; +int UseStrictPrivMsg; int DumpCore; int LogUsers; int NickRegDelay; @@ -610,6 +611,7 @@ Directive directives[] = { {"UpdateTimeout", {{PARAM_TIME, PARAM_RELOAD, &UpdateTimeout}}}, {"UseMail", {{PARAM_SET, PARAM_RELOAD, &UseMail}}}, {"UsePrivmsg", {{PARAM_SET, PARAM_RELOAD, &UsePrivmsg}}}, + {"UseStrictPrivMsg", {{PARAM_SET, PARAM_RELOAD, &UseStrictPrivMsg}}}, {"UserKey1", {{PARAM_POSINT, PARAM_RELOAD, &UserKey1}}}, {"UserKey2", {{PARAM_POSINT, PARAM_RELOAD, &UserKey2}}}, {"UserKey3", {{PARAM_POSINT, PARAM_RELOAD, &UserKey3}}}, diff --git a/src/messages.c b/src/messages.c index 263e96ea2..8353987c6 100644 --- a/src/messages.c +++ b/src/messages.c @@ -139,7 +139,6 @@ int m_privmsg(char *source, char *receiver, char *msg) } } } else { - /* Check if we should ignore. Operators always get through. */ if (allow_ignore && !is_oper(u)) { IgnoreData *ign = get_ignore(source); @@ -156,6 +155,13 @@ int m_privmsg(char *source, char *receiver, char *msg) *s++ = 0; if (stricmp(s, ServerName) != 0) return MOD_CONT; + } else if (UseStrictPrivMsg) { + if (debug) { + alog("Ignored PRIVMSG without @ from %s", source); + } + notice_lang(receiver, u, INVALID_TARGET, receiver, receiver, + ServerName, receiver); + return MOD_CONT; } starttime = time(NULL); diff --git a/version.log b/version.log index 2937867d7..8b29aab59 100644 --- a/version.log +++ b/version.log @@ -9,10 +9,14 @@ VERSION_MAJOR="1" VERSION_MINOR="7" VERSION_PATCH="14" VERSION_EXTRA="" -VERSION_BUILD="1072" +VERSION_BUILD="1073" # $Log$ # +# BUILD : 1.7.14 (1073) +# BUGS : N/A +# NOTES : Added a string privmsg option, which can force services to only accept /msg nick@host +# # BUILD : 1.7.14 (1072) # BUGS : # NOTES : Fixed a mistake in en_us.nl and updated inspircd support module |