summaryrefslogtreecommitdiff
path: root/src
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 /src
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
Diffstat (limited to 'src')
-rw-r--r--src/config.c2
-rw-r--r--src/messages.c8
2 files changed, 9 insertions, 1 deletions
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);