Guest User

Untitled

a guest
Dec 3rd, 2017
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.08 KB | None | 0 0
  1. RAW 317:*: {
  2. if (%check == yes) {
  3. if (*!*@*HelpDesk* iswm $address($2,2) && $readini(helpdesk.ini, Duty, $address($2,2)) == on) {
  4. if ($3 < 2700) {
  5. msg %check.chan $2 has been idle for $duration($3) $+ .
  6. unset %check
  7. unset %check.chan
  8. }
  9. else {
  10. msg %check.chan $2 has been idle for $duration($3) $+ .
  11. describe %check.chan sets $2 off duty, due to being idle for longer than 45 minutes.
  12. writeini helpdesk.ini Duty $address($2,2) off
  13. inc %duty.count -1
  14. unset %check
  15. unset %check.chan
  16. }
  17. }
  18. else {
  19. msg %check.chan $2 has been idle for $duration($3) $+ .
  20. unset %check
  21. unset %check.chan
  22. }
  23. }
  24. }
  25. on *:kick:#Helpdesk: {
  26. set %hd.kick $address($knick,2)
  27. if (*!*@*HelpDesk* iswm %hd.kick) && ($readini(helpdesk.ini, Duty, $address($knick,2)) == on) {
  28. var %x = % [ $+ [ temp.time. ] $+ [ $address($knick,2) ] ]
  29. inc %total.time. $+ $address($knick,2) $calc($ctime - %x)
  30. var %y = % [ $+ [ total.time. ] $+ [ $address($knick,2) ] ]
  31. writeini helpdesk.ini Duty $address($knick,2) off
  32. inc %duty.count -1
  33. describe # sets $knick as off duty due to being kicked. $knick was on duty for $duration($calc($ctime - %x)) $+ , bringing their total time up to $duration(%y)
  34. unset %hd.kick
  35. unset %temp.time. $+ $address($knick,2)
  36. }
  37. }
  38. on *:quit: {
  39. set %hd.quit $address($nick,2)
  40. if (*!*@*HelpDesk* iswm %hd.quit) && ($readini(helpdesk.ini, Duty, $address($nick,2)) == on) {
  41. var %x = % [ $+ [ temp.time. ] $+ [ $address($nick,2) ] ]
  42. inc %total.time. $+ $address($nick,2) $calc($ctime - %x)
  43. var %y = % [ $+ [ total.time. ] $+ [ $address($nick,2) ] ]
  44. writeini helpdesk.ini Duty $address($nick,2) off
  45. inc %duty.count -1
  46. describe #Helpdesk sets $nick as off duty due to disconnecting. $nick was on duty for $duration($calc($ctime - %x)) $+ , bringing their total time up to $duration(%y)
  47. unset %hd.quit
  48. }
  49. }
  50. on *:part:#Helpdesk: {
  51. set %hd.part $address($nick,2)
  52. if (*!*@*HelpDesk* iswm %hd.part) && ($readini(helpdesk.ini, Duty, $address($nick,2)) == on) {
  53. var %x = % [ $+ [ temp.time. ] $+ [ $address($nick,2) ] ]
  54. inc %total.time. $+ $address($nick,2) $calc($ctime - %x)
  55. var %y = % [ $+ [ total.time. ] $+ [ $address($nick,2) ] ]
  56. writeini helpdesk.ini Duty $address($nick,2) off
  57. inc %duty.count -1
  58. describe # sets $nick as off duty due to /part. $nick was on duty for $duration($calc($ctime - %x)) $+ , bringing their total time up to $duration(%y)
  59. unset %hd.part
  60. }
  61. }
  62. on *:join:#Helpdesk: {
  63. notice $nick Welcome to # $+ . Type `list to see if there is currently someone on duty to assist you. If there is, type `help to request assistance. If not, see if the instructions in the notice help you. If you still need assistance, /part and come back later.
  64. }
  65. on *:nick: {
  66. set %hd.nickchng $address($newnick,2)
  67. if (*!*@*HelpDesk* iswm %hd.nickchng) {
  68. writeini helpdesk.ini Hosts $address($newnick,2) $newnick
  69. unset %hd.nickchng
  70. }
  71. }
  72.  
  73. on *:text:-count*:#Helpdesk: { if ($address($nick,2) == *!*@I.R.Smart.PI.HelpDesk.Operator) { /set %duty.count $2 | /notice $nick Count set to %duty.count $+ . } }
  74. on *:text:*:#Helpdesk: {
  75. if ($1 == `add) {
  76. if ($address($nick,2) != *!*@Head.of.HelpDesk.and.Delicate.Affairs) {
  77. msg # It appears you do not have the correct clearance for that command, $nick $+ .
  78. halt
  79. }
  80. else {
  81. if ($2 !ison $chan) {
  82. msg # I'm sorry, but there doesn't appear to be a $2 on this channel.
  83. halt
  84. }
  85. else {
  86. writeini helpdesk.ini Duty $address($2,2) off
  87. writeini helpdesk.ini Hosts $address($2,2) $2
  88. msg # $2 successfully added to the Helpers list, with the default setting 'off duty.' Please note, the address that has been registered to this nick is $address($2,2) $+ . Should this change for any reason, helpdesk.ini will need to be edited manually.
  89. set %help.users $address($2,2) %help.users
  90. set %total.time. $+ $address($2,2) 0
  91. halt
  92. }
  93. }
  94. }
  95. if ($1 == `del) {
  96. if ($address($nick,2) != *!*@Head.of.HelpDesk.and.Delicate.Affairs) {
  97. msg # It appears you do not have the correct clearance for that command, $nick $+ .
  98. halt
  99. }
  100. else {
  101. remini helpdesk.ini Duty $address($2,2) off
  102. remini helpdesk.ini Hosts $address($2,2) $2
  103. msg # $2 successfully removed from the HelpOp list. :)
  104. unset %total.time. $+ $address($2,2) 0
  105. halt
  106. }
  107. }
  108. if ($1 == `on) && ($2 == duty) {
  109. if ($address($nick,2) !isin %help.users) {
  110. msg # Why are you trying to use that command, $nick $+ ?
  111. halt
  112. }
  113. else {
  114. if ($readini(helpdesk.ini, Duty, $address($nick,2)) == on) {
  115. notice $nick You're already marked as on duty, $nick $+ !
  116. halt
  117. }
  118. else {
  119. set %temp.time. $+ $address($nick,2) $ctime
  120. inc %duty.count 1
  121. duty $nick on
  122. msg # $nick is now marked as on duty.
  123. }
  124. }
  125. }
  126. if ($1 == `off) && ($2 == duty) {
  127. if ($address($nick,2) !isin %help.users) {
  128. msg # Why are you trying to use that command, $nick $+ ?
  129. halt
  130. }
  131. else {
  132. if ($readini(helpdesk.ini, Duty, $address($nick,2)) == off) {
  133. notice $nick You're already marked as off duty, $nick $+ !
  134. halt
  135. }
  136. else {
  137. var %x = % [ $+ [ temp.time. ] $+ [ $address($nick,2) ] ]
  138. inc %total.time. $+ $address($nick,2) $calc($ctime - %x)
  139. var %y = % [ $+ [ total.time. ] $+ [ $address($nick,2) ] ]
  140. inc %duty.count -1
  141. duty $nick off
  142. msg # $nick is now marked as off duty. $nick was on duty for $duration($calc($ctime - %x)) $+ , bringing their total time up to $duration(%y)
  143. unset %temp.time. $+ $address($nick,2)
  144. }
  145. }
  146. }
  147. if ($1 == `help) {
  148. if (%duty.count == 0) {
  149. msg # I'm sorry, there doesn't appear to be anyone on duty at the moment. D:
  150. msg $nick If you need ChanServ help, type /cs help. To help with a specific command, type /cs help [command]
  151. msg $nick If you need NickServ help, type /ns help. To help with a specific command, type /ns help [command]
  152. msg $nick If you need BotServ help, type /bs help. To help with a specific command, type /bs help [command]
  153. msg $nick If you need HostServ help, type /hs help. To help with a specific command, type /hs help [command]
  154. msg $nick If you need MemoServ help, type /ms help. To help with a specific command, type /ms help [command]
  155. msg $nick For a list of User commands, type /helpop usercmds
  156. msg $nick For a list of Oper commands, type /helpop opercmds
  157. msg $nick For a list of User modes, type /helpop umodes
  158. msg $nick For a list of Channel modes, type /helpop chmodes
  159. }
  160. else {
  161. if ($readini(helpdesk.ini, Duty, *!*@I.R.Smart.PI.HelpDesk.Operator) == on) {
  162. msg $readini(helpdesk.ini, Hosts, *!*@I.R.Smart.PI.HelpDesk.Operator) $nick requires assistance.
  163. }
  164. if ($readini(helpdesk.ini, Duty, *!*@Cat.Up.Leaf.Helpdesk.Trainee) == on) {
  165. msg $readini(helpdesk.ini, Hosts, *!*@Cat.Up.Leaf.Helpdesk.Trainee) $nick requires assistance.
  166. }
  167. if ($readini(helpdesk.ini, Duty, *!*@Head.of.HelpDesk.and.Delicate.Affairs) == on) {
  168. msg $readini(helpdesk.ini, Hosts, *!*@Head.of.HelpDesk.and.Delicate.Affairs) $nick requires assistance.
  169. }
  170. if ($readini(helpdesk.ini, Duty, *!*@PI.Helpdesk.Admin) == on) {
  171. msg $readini(helpdesk.ini, Hosts, *!*@PI.Helpdesk.Admin) $nick requires assistance.
  172. }
  173. if ($readini(helpdesk.ini, Duty, *!*@Echo.of.Silence.Helpdesk.Trainee) == on) {
  174. msg $readini(helpdesk.ini, Hosts, *!*@Echo.of.Silence.Helpdesk.Trainee) $nick requires assistance.
  175. }
  176. }
  177. }
  178. if ($1 == `list) {
  179. if (%duty.count == 0) {
  180. msg # I'm sorry, there doesn't appear to be anyone on duty at the moment. D:
  181. msg $nick If you need ChanServ help, type /cs help. To help with a specific command, type /cs help [command]
  182. msg $nick If you need NickServ help, type /ns help. To help with a specific command, type /ns help [command]
  183. msg $nick If you need BotServ help, type /bs help. To help with a specific command, type /bs help [command]
  184. msg $nick If you need HostServ help, type /hs help. To help with a specific command, type /hs help [command]
  185. msg $nick If you need MemoServ help, type /ms help. To help with a specific command, type /ms help [command]
  186. msg $nick For a list of User commands, type /helpop usercmds
  187. msg $nick For a list of Oper commands, type /helpop opercmds
  188. msg $nick For a list of User modes, type /helpop umodes
  189. msg $nick For a list of Channel modes, type /helpop chmodes
  190. }
  191. else {
  192. if ($readini(helpdesk.ini, Duty, *!*@Head.of.HelpDesk.and.Delicate.Affairs) == on) {
  193. var %temp = %temp.time.*!*@Head.of.HelpDesk.and.Delicate.Affairs
  194. msg # $readini(helpdesk.ini, Hosts, *!*@Head.of.HelpDesk.and.Delicate.Affairs) is currently on duty, and has been for $duration($calc($ctime - %temp)) $+ .
  195. }
  196. if ($readini(helpdesk.ini, Duty, *!*@Cat.Up.Leaf.Helpdesk.Trainee) == on) {
  197. var %temp = %temp.time.*!*@Cat.Up.Leaf.Helpdesk.Trainee
  198. msg # $readini(helpdesk.ini, Hosts, *!*@Cat.Up.Leaf.Helpdesk.Trainee) is currently on duty, and has been for $duration($calc($ctime - %temp)) $+ .
  199. }
  200. if ($readini(helpdesk.ini, Duty, *!*@I.R.Smart.PI.HelpDesk.Operator) == on) {
  201. var %temp = %temp.time.*!*@I.R.Smart.PI.HelpDesk.Operator
  202. msg # $readini(helpdesk.ini, Hosts, *!*@I.R.Smart.PI.HelpDesk.Operator) is currently on duty, and has been for $duration($calc($ctime - %temp)) $+ .
  203. }
  204. if ($readini(helpdesk.ini, Duty, *!*@PI.Helpdesk.Admin) == on) {
  205. var %temp = %temp.time.*!*@PI.Helpdesk.Admin
  206. msg # $readini(helpdesk.ini, Hosts, *!*@PI.Helpdesk.Admin) is currently on duty, and has been for $duration($calc($ctime - %temp)) $+ .
  207. }
  208. if ($readini(helpdesk.ini, Duty, *!*@Echo.of.Silence.Helpdesk.Trainee) == on) {
  209. var %temp = %temp.time.*!*@Echo.of.Silence.Helpdesk.Trainee
  210. msg # $readini(helpdesk.ini, Hosts, *!*@Echo.of.Silence.Helpdesk.Trainee) is currently on duty, and has been for $duration($calc($ctime - %temp)) $+ .
  211. }
  212. }
  213. }
  214. if ($1 == `time && $2 ison $chan) {
  215. set %hd.time $address($2,2)
  216. if (*!*@*HelpDesk* iswm %hd.time) {
  217. var %y = % [ $+ [ total.time. ] $+ [ $address($2,2) ] ]
  218. msg # $readini(helpdesk.ini, Hosts, $address($2,2)) has completed a total of $duration(%y) on duty. (This does not include their current session if they're on duty now.)
  219. unset %hd.time
  220. }
  221. }
  222. if ($1 == `idlecheck && $2 ison $chan) {
  223. whois $2
  224. set %check yes
  225. set %check.chan $chan
  226. }
  227. }
  228.  
  229.  
  230.  
  231. alias duty {
  232. writeini helpdesk.ini Duty $address($1,2) $2
  233. if ($2 == on) { inc %duty.count 1 }
  234. if ($2 == off) { inc %duty.count -1 }
  235. }
  236. alias hdreset {
  237. unset %total.time*
  238. unset %help.users
  239. set %duty.count 0
  240. }
Add Comment
Please, Sign In to add comment