[mw-devel] MW3 r1263 - in trunk: src talkhelp wizhelp
arthur at sucs.org
arthur at sucs.org
Mon Oct 1 13:40:33 BST 2012
Author: arthur
Date: 2012-10-01 13:40:33 +0100 (Mon, 01 Oct 2012)
New Revision: 1263
Added:
trunk/talkhelp/topic
Modified:
trunk/src/talker.c
trunk/src/talker_privs.c
trunk/src/talker_privs.h
trunk/wizhelp/chatprivs
Log:
Widen permissions for the .topic command and add a help page.
Modified: trunk/src/talker.c
===================================================================
--- trunk/src/talker.c 2012-10-01 12:40:01 UTC (rev 1262)
+++ trunk/src/talker.c 2012-10-01 12:40:33 UTC (rev 1263)
@@ -1382,7 +1382,7 @@
if (topic != NULL) free(topic);
return;
} else
- if (u_god(user->status)) {
+ if (u_god(user->status) || s_wizchat(user->special) || cp_flags(user->chatprivs,CP_TOPIC,CM_MODE_ANY)) {
char text[MAXTEXTLENGTH];
const char *topic;
Modified: trunk/src/talker_privs.c
===================================================================
--- trunk/src/talker_privs.c 2012-10-01 12:40:01 UTC (rev 1262)
+++ trunk/src/talker_privs.c 2012-10-01 12:40:33 UTC (rev 1263)
@@ -542,6 +542,7 @@
if (cm & CP_SCRIPT) strcat(s, "s");
if (cm & CP_ADVSCR) strcat(s, "A");
if (cm & CP_DEVEL) strcat(s, "D");
+ if (cm & CP_TOPIC) strcat(s, "t");
return (s);
}
@@ -561,6 +562,7 @@
if (cp & CP_SCRIPT) tmp[i++]='s'; else if (flag) tmp[i++]='-';
if (cp & CP_ADVSCR) tmp[i++]='A'; else if (flag) tmp[i++]='-';
if (cp & CP_DEVEL) tmp[i++]='D'; else if (flag) tmp[i++]='-';
+ if (cp & CP_TOPIC) tmp[i++]='t'; else if (flag) tmp[i++]='-';
tmp[i]=0;
}
@@ -588,6 +590,7 @@
case 's': p=p|CP_SCRIPT;break;
case 'A': p=p|CP_ADVSCR;break;
case 'D': p=p|CP_DEVEL;break;
+ case 't': p=p|CP_TOPIC;break;
};
if (mode==0) return(p);
else if (mode==-1) return(stat|p);
Modified: trunk/src/talker_privs.h
===================================================================
--- trunk/src/talker_privs.h 2012-10-01 12:40:01 UTC (rev 1262)
+++ trunk/src/talker_privs.h 2012-10-01 12:40:33 UTC (rev 1263)
@@ -44,7 +44,7 @@
#define CP_ADVSCR 0x00000800
#define CP_DEVEL 0x00001000
#define CP_PROTMASK 0x0000E000
-#define CP_UNUSED1 0x00010000
+#define CP_TOPIC 0x00010000
#define CP_PROTSHIFT 13
Added: trunk/talkhelp/topic
===================================================================
--- trunk/talkhelp/topic (rev 0)
+++ trunk/talkhelp/topic 2012-10-01 12:40:33 UTC (rev 1263)
@@ -0,0 +1,21 @@
+[1mNAME[0m
+ topic - get/set channel topic
+
+[1mSYNOPSIS[0m
+ [1m.topic[0m
+ [1m.topic[0m [4mWHAT[0m
+ [1m.topic[0m [4m""[0m
+
+[1mDESCRIPTION[0m
+ You can use this command to view/change/clear the channel topic.
+ If a topic is set, then it is displayed to all users when they
+ enter a channel. It can be viewed again at any time by using
+ the [1m.topic[0m command on it's own.
+
+ Users with suitable permissions can set a new topic by specifying
+ one after the [1m.topic[0m command.
+
+ The topic can be removed by setting the empty string [1m""[0m
+
+ The change will be announced to all the logged in users.
+
Modified: trunk/wizhelp/chatprivs
===================================================================
--- trunk/wizhelp/chatprivs 2012-10-01 12:40:01 UTC (rev 1262)
+++ trunk/wizhelp/chatprivs 2012-10-01 12:40:33 UTC (rev 1263)
@@ -16,6 +16,7 @@
[1mm[0m - Enable [1mmud mode[0m
[1mA[0m - Can use advanced script commands and privileges
[1mD[0m - Enable Developer info in scripts
+ [1mt[0m - Can change channel [1mtopic[0m
[1mSEE ALSO[0m
chatmodes
More information about the mw-devel
mailing list