diff -r e63bf7596cda doc/unreal32docs.html
--- a/doc/unreal32docs.html Fri May 10 19:32:14 2013 +0200
+++ b/doc/unreal32docs.html Tue May 14 02:22:45 2013 -0600
@@ -1150,6 +1150,11 @@
can_die |
Oper may use /die |
+
+ T |
+ can_tsctl |
+ Oper may use /tsctl |
+
R |
can_restart |
diff -r e63bf7596cda help.conf
--- a/help.conf Fri May 10 19:32:14 2013 +0200
+++ b/help.conf Tue May 14 02:22:45 2013 -0600
@@ -298,6 +298,7 @@
" r (can_rehash) Access to /REHASH server";
" R (can_restart) Access to /RESTART server";
" D (can_die) Access to /DIE server";
+ " T (can_tsctl) Access to /TSCTL";
" h (helpop) Oper receives umode +h (helpop)";
" g (can_globops) Oper can send /GLOBOPS";
" w (can_wallops) Oper can send /WALLOPS";
diff -r e63bf7596cda include/struct.h
--- a/include/struct.h Fri May 10 19:32:14 2013 +0200
+++ b/include/struct.h Tue May 14 02:22:45 2013 -0600
@@ -570,24 +570,25 @@
* defined operator access levels
*/
#define OFLAG_REHASH 0x00000001 /* Oper can /rehash server */
-#define OFLAG_DIE 0x00000002 /* Oper can /die the server */
+#define OFLAG_DIE 0x00000002 /* Oper can /die the server */
#define OFLAG_RESTART 0x00000004 /* Oper can /restart the server */
#define OFLAG_DCCDENY 0x00000008 /* Oper can use /dccdeny and /undccdeny */
#define OFLAG_HELPOP 0x00000010 /* Oper can send /HelpOps */
#define OFLAG_GLOBOP 0x00000020 /* Oper can send /GlobOps */
#define OFLAG_WALLOP 0x00000040 /* Oper can send /WallOps */
-#define OFLAG_LOCOP 0x00000080 /* Oper can send /LocOps */
+#define OFLAG_LOCOP 0x00000080 /* Oper can send /LocOps */
#define OFLAG_LROUTE 0x00000100 /* Oper can do local routing */
#define OFLAG_GROUTE 0x00000200 /* Oper can do global routing */
-#define OFLAG_LKILL 0x00000400 /* Oper can do local kills */
-#define OFLAG_GKILL 0x00000800 /* Oper can do global kills */
-#define OFLAG_KLINE 0x00001000 /* Oper can /kline users */
+#define OFLAG_LKILL 0x00000400 /* Oper can do local kills */
+#define OFLAG_GKILL 0x00000800 /* Oper can do global kills */
+#define OFLAG_KLINE 0x00001000 /* Oper can /kline users */
#define OFLAG_UNKLINE 0x00002000 /* Oper can /unkline users */
#define OFLAG_LNOTICE 0x00004000 /* Oper can send local serv notices */
#define OFLAG_GNOTICE 0x00008000 /* Oper can send global notices */
-#define OFLAG_ADMIN 0x00010000 /* Admin */
+#define OFLAG_ADMIN 0x00010000 /* Admin */
#define OFLAG_ADDLINE 0x00020000 /* Oper can use /addline */
-#define OFLAG_ZLINE 0x00080000 /* Oper can use /zline and /unzline */
+#define OFLAG_TSCTL 0x00040000 /* Oper can use /tsctl */
+#define OFLAG_ZLINE 0x00080000 /* Oper can use /zline and /unzline */
#define OFLAG_NETADMIN 0x00200000 /* netadmin gets +N */
#define OFLAG_COADMIN 0x00800000 /* co admin gets +C */
#define OFLAG_SADMIN 0x01000000 /* services admin gets +a */
@@ -614,6 +615,7 @@
#define OPCanZline(x) ((x)->oflag & OFLAG_ZLINE)
#define OPCanRehash(x) ((x)->oflag & OFLAG_REHASH)
#define OPCanDie(x) ((x)->oflag & OFLAG_DIE)
+#define OPCanTSCtl(x) ((x)->oflag & OFLAG_TSCTL)
#define OPCanRestart(x) ((x)->oflag & OFLAG_RESTART)
#define OPCanHelpOp(x) ((x)->oflag & OFLAG_HELPOP)
#define OPCanGlobOps(x) ((x)->oflag & OFLAG_GLOBOP)
@@ -640,6 +642,7 @@
#define OPSetRehash(x) ((x)->oflag |= OFLAG_REHASH)
#define OPSetDie(x) ((x)->oflag |= OFLAG_DIE)
+#define OPSetTSCtl(x) ((x)->oflag |= OFLAG_TSCTL)
#define OPSetRestart(x) ((x)->oflag |= OFLAG_RESTART)
#define OPSetHelpOp(x) ((x)->oflag |= OFLAG_HELPOP)
#define OPSetGlobOps(x) ((x)->oflag |= OFLAG_GLOBOP)
@@ -661,6 +664,7 @@
#define OPSetWhois(x) ((x)->oflag |= OFLAG_WHOIS)
#define OPClearRehash(x) ((x)->oflag &= ~OFLAG_REHASH)
#define OPClearDie(x) ((x)->oflag &= ~OFLAG_DIE)
+#define OPClearTSCtl(x) ((x)->oflag &= ~OFLAG_TSCTL)
#define OPClearRestart(x) ((x)->oflag &= ~OFLAG_RESTART)
#define OPClearHelpOp(x) ((x)->oflag &= ~OFLAG_HELPOP)
#define OPClearGlobOps(x) ((x)->oflag &= ~OFLAG_GLOBOP)
diff -r e63bf7596cda src/modules/m_svso.c
--- a/src/modules/m_svso.c Fri May 10 19:32:14 2013 +0200
+++ b/src/modules/m_svso.c Tue May 14 02:22:45 2013 -0600
@@ -85,6 +85,7 @@
OFLAG_UMODEQ, 'q',
OFLAG_DCCDENY, 'd',
OFLAG_ADDLINE, 'X',
+ OFLAG_TSCTL, 'T',
0, 0
};
diff -r e63bf7596cda src/modules/m_tsctl.c
--- a/src/modules/m_tsctl.c Fri May 10 19:32:14 2013 +0200
+++ b/src/modules/m_tsctl.c Tue May 14 02:22:45 2013 -0600
@@ -117,7 +117,13 @@
if (stricmp(parv[1], "offset") == 0)
{
- if (!parv[3])
+ if (!OPCanTSCtl(sptr))
+ {
+ sendto_one(sptr, err_str(ERR_NOPRIVILEGES), me.name, parv[0]);
+ return 0;
+ }
+
+ if (!parv[2] || !parv[3])
{
sendto_one(sptr,
":%s NOTICE %s :*** TSCTL OFFSET: /tsctl offset <+|->