From 369aef56c68aecccac7c3c30108fd958cfdc62f0 Mon Sep 17 00:00:00 2001
From: brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Date: Fri, 4 Apr 2008 18:50:09 +0000
Subject: Allow for custom prefixes as status chars in /notice @#chan etc. Up
 until now theyve just used a hard coded check on @%+. This slows down writing
 to a channels users by a small amount, but only when writing to a prefix is
 happening.

git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9329 e03df62e-2008-0410-955e-edbf42e46eb7
---
 src/commands/cmd_notice.cpp  | 2 +-
 src/commands/cmd_privmsg.cpp | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

(limited to 'src/commands')

diff --git a/src/commands/cmd_notice.cpp b/src/commands/cmd_notice.cpp
index ee9868fb3..1a47b56fb 100644
--- a/src/commands/cmd_notice.cpp
+++ b/src/commands/cmd_notice.cpp
@@ -51,7 +51,7 @@ CmdResult CommandNotice::Handle (const char* const* parameters, int pcnt, User *
 	}
 	char status = 0;
 	const char* target = parameters[0];
-	if ((*target == '@') || (*target == '%') || (*target == '+'))
+	if (ServerInstance->Modes->FindPrefix(*target))
 	{
 		status = *target;
 		target++;
diff --git a/src/commands/cmd_privmsg.cpp b/src/commands/cmd_privmsg.cpp
index c9100dcd9..9ce089dc0 100644
--- a/src/commands/cmd_privmsg.cpp
+++ b/src/commands/cmd_privmsg.cpp
@@ -50,7 +50,7 @@ CmdResult CommandPrivmsg::Handle (const char* const* parameters, int pcnt, User
 	}
 	char status = 0;
 	const char* target = parameters[0];
-	if ((*target == '@') || (*target == '%') || (*target == '+'))
+	if (ServerInstance->Modes->FindPrefix(*target))
 	{
 		status = *target;
 		target++;
-- 
cgit v1.2.3