Guest User

Untitled

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