summaryrefslogtreecommitdiff
path: root/src/commands.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands.cpp')
-rw-r--r--src/commands.cpp21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/commands.cpp b/src/commands.cpp
index c098bbb10..610b694bc 100644
--- a/src/commands.cpp
+++ b/src/commands.cpp
@@ -1863,18 +1863,25 @@ void handle_V(char token,char* params,serverrec* source,serverrec* reply, char*
userrec* user = Find(src);
if (user)
{
- userrec* dst = Find(dest);
-
- if (dst)
+ // notice all - only issuable by a server
+ if (strcmp(dest,"*"))
{
- WriteTo(user, dst, "NOTICE %s :%s", dst->nick, text);
+ NoticeAll(user,true,"%s",text);
}
else
{
- chanrec* d = FindChan(dest);
- if (d)
+ userrec* dst = Find(dest);
+ if (dst)
{
- ChanExceptSender(d, user, "NOTICE %s :%s", d->name, text);
+ WriteTo(user, dst, "NOTICE %s :%s", dst->nick, text);
+ }
+ else
+ {
+ chanrec* d = FindChan(dest);
+ if (d)
+ {
+ ChanExceptSender(d, user, "NOTICE %s :%s", d->name, text);
+ }
}
}
}