summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrob 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
committerrob 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
commit90252bbeccbfde0e28a13b58edb463d3b6463b8f (patch)
tree5e110ea417237ddac9edde5592d12c9959ef7a06
parent74cc91636ab415177f58f8408e649023c593c0be (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--Changes1
-rw-r--r--Changes.conf8
-rw-r--r--Changes.lang1
-rw-r--r--data/example.conf8
-rw-r--r--include/extern.h1
-rw-r--r--lang/cat.l2
-rw-r--r--lang/de.l2
-rw-r--r--lang/en_us.l2
-rw-r--r--lang/es.l2
-rw-r--r--lang/fr.l2
-rw-r--r--lang/gr.l2
-rw-r--r--lang/hun.l2
-rw-r--r--lang/it.l2
-rw-r--r--lang/nl.l2
-rw-r--r--lang/pl.l2
-rw-r--r--lang/pt.l2
-rw-r--r--lang/ru.l2
-rw-r--r--lang/tr.l2
-rw-r--r--src/config.c2
-rw-r--r--src/messages.c8
-rw-r--r--version.log6
21 files changed, 59 insertions, 2 deletions
diff --git a/Changes b/Changes
index ce8265149..972420f6a 100644
--- a/Changes
+++ b/Changes
@@ -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
diff --git a/lang/de.l b/lang/de.l
index 25a14a38d..ba3ab86ff 100644
--- a/lang/de.l
+++ b/lang/de.l
@@ -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
diff --git a/lang/es.l b/lang/es.l
index af1c00f0d..308a006db 100644
--- a/lang/es.l
+++ b/lang/es.l
@@ -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
diff --git a/lang/fr.l b/lang/fr.l
index f8b9e68d6..136034c0e 100644
--- a/lang/fr.l
+++ b/lang/fr.l
@@ -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
diff --git a/lang/gr.l b/lang/gr.l
index 21f018503..cbce538d2 100644
--- a/lang/gr.l
+++ b/lang/gr.l
@@ -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
diff --git a/lang/it.l b/lang/it.l
index ebc33f84e..aa0561402 100644
--- a/lang/it.l
+++ b/lang/it.l
@@ -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
diff --git a/lang/nl.l b/lang/nl.l
index 493aa3e9f..81601d7ee 100644
--- a/lang/nl.l
+++ b/lang/nl.l
@@ -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
diff --git a/lang/pl.l b/lang/pl.l
index 26bb8f128..b4bb6134a 100644
--- a/lang/pl.l
+++ b/lang/pl.l
@@ -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
diff --git a/lang/pt.l b/lang/pt.l
index b9d5eac6f..8727af937 100644
--- a/lang/pt.l
+++ b/lang/pt.l
@@ -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
diff --git a/lang/ru.l b/lang/ru.l
index 23eddc8fe..8ac0941f1 100644
--- a/lang/ru.l
+++ b/lang/ru.l
@@ -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
diff --git a/lang/tr.l b/lang/tr.l
index 2701990f6..56ee18ebd 100644
--- a/lang/tr.l
+++ b/lang/tr.l
@@ -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