diff -r 3e112467aacd -r 7fe7520a72b3 plugins/basechat.sp --- a/plugins/basechat.sp Mon Oct 01 21:20:30 2007 +0000 +++ b/plugins/basechat.sp Tue Oct 02 00:20:18 2007 +0000 @@ -44,6 +44,8 @@ url = "http://www.sourcemod.net/" }; +#define CHAT_SYMBOL '@' + new String:g_ColorNames[13][10] = {"White", "Red", "Green", "Blue", "Yellow", "Purple", "Cyan", "Orange", "Pink", "Olive", "Lime", "Violet", "Lightblue"}; new g_Colors[13][3] = {{255,255,255},{255,0,0},{0,255,0},{0,0,255},{255,255,0},{255,0,255},{0,255,255},{255,128,0},{255,0,128},{128,255,0},{0,255,128},{128,0,255},{0,128,255}}; @@ -93,16 +95,16 @@ startidx = 1; } - if (text[startidx] != '@') + if (text[startidx] != CHAT_SYMBOL) return Plugin_Continue; new msgStart = 1; - if (text[startidx+1] == '@') + if (text[startidx+1] == CHAT_SYMBOL) { msgStart = 2; - if (text[startidx+2] == '@') + if (text[startidx+2] == CHAT_SYMBOL) msgStart = 3; } @@ -162,7 +164,7 @@ } decl String:text[192]; - if (GetCmdArgString(text, sizeof(text)) < 1) + if (IsChatTrigger() || GetCmdArgString(text, sizeof(text)) < 1) { return Plugin_Continue; } @@ -174,7 +176,7 @@ startidx = 1; } - if (text[startidx] != '@') + if (text[startidx] != CHAT_SYMBOL) return Plugin_Continue; decl String:message[192];