1.1 --- a/plugins/basechat.sp Mon Oct 01 21:20:30 2007 +0000
1.2 +++ b/plugins/basechat.sp Tue Oct 02 00:20:18 2007 +0000
1.3 @@ -44,6 +44,8 @@
1.4 url = "http://www.sourcemod.net/"
1.5 };
1.6
1.7 +#define CHAT_SYMBOL '@'
1.8 +
1.9 new String:g_ColorNames[13][10] = {"White", "Red", "Green", "Blue", "Yellow", "Purple", "Cyan", "Orange", "Pink", "Olive", "Lime", "Violet", "Lightblue"};
1.10 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}};
1.11
1.12 @@ -93,16 +95,16 @@
1.13 startidx = 1;
1.14 }
1.15
1.16 - if (text[startidx] != '@')
1.17 + if (text[startidx] != CHAT_SYMBOL)
1.18 return Plugin_Continue;
1.19
1.20 new msgStart = 1;
1.21
1.22 - if (text[startidx+1] == '@')
1.23 + if (text[startidx+1] == CHAT_SYMBOL)
1.24 {
1.25 msgStart = 2;
1.26
1.27 - if (text[startidx+2] == '@')
1.28 + if (text[startidx+2] == CHAT_SYMBOL)
1.29 msgStart = 3;
1.30 }
1.31
1.32 @@ -162,7 +164,7 @@
1.33 }
1.34
1.35 decl String:text[192];
1.36 - if (GetCmdArgString(text, sizeof(text)) < 1)
1.37 + if (IsChatTrigger() || GetCmdArgString(text, sizeof(text)) < 1)
1.38 {
1.39 return Plugin_Continue;
1.40 }
1.41 @@ -174,7 +176,7 @@
1.42 startidx = 1;
1.43 }
1.44
1.45 - if (text[startidx] != '@')
1.46 + if (text[startidx] != CHAT_SYMBOL)
1.47 return Plugin_Continue;
1.48
1.49 decl String:message[192];