Code: Show/Hide --- core/chat.c 2006-06-08 23:41:24.000000000 +0100
+++ new/chat1.c 2006-07-03 20:30:16.000000000 +0100 @@ -1,3 +1,8 @@ +/* chat1 + * + * modified to filter out lines in pub chat with just a number in them. smong. + * + */ /* dist: public */ @@ -441,7 +446,11 @@ int type = ismacro ? MSG_PUBMACRO : MSG_PUB; LinkedList set = LL_INITIALIZER; get_arena_set(&set, arena, p); - send_reply(&set, type, sound, p, p->pid, msg, 0); + + /* hack: eat integers between 1 and 9 inclusive */ + if (msg[1] != 0 || *msg < '1' || *msg > '9') + send_reply(&set, type, sound, p, p->pid, msg, 0); + DO_CBS(CB_CHATMSG, arena, ChatMsgFunc, (p, type, sound, NULL, -1, msg)); lm->LogP(L_DRIVEL, "chat", p, "pub msg: %s", msg); } @@ -879,7 +888,7 @@ }; -EXPORT int MM_chat(int action, Imodman *mm_, Arena *arena) +EXPORT int MM_chat1(int action, Imodman *mm_, Arena *arena) { if (action == MM_LOAD) { |