summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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);