Guest User

Untitled

a guest
Dec 4th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.48 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. if ($knick == $me) {
  27. writeini helpdesk.ini Duty *!*@Head.of.HelpDesk.and.Delicate.Affairs off
  28. writeini helpdesk.ini Duty *!*@Cat.Up.Leaf.HelpDesk.Trainee off
  29. writeini helpdesk.ini Duty *!*@I.R.Smart.PI.HelpDesk.Operator off
  30. writeini helpdesk.ini Duty *!*@Echo.of.Silence.Helpdesk.Trainee off
  31. writeini helpdesk.ini Duty *!*@PI.Helpdesk.Admin off
  32. set %duty.count 0
  33. unset %temp.time.*
  34. }
  35. set %hd.kick $address($knick,2)
  36. if (*!*@*HelpDesk* iswm %hd.kick) && ($readini(helpdesk.ini, Duty, $address($knick,2)) == on) {
  37. var %x = % [ $+ [ temp.time. ] $+ [ $address($knick,2) ] ]
  38. inc %total.time. $+ $address($knick,2) $calc($ctime - %x)
  39. var %y = % [ $+ [ total.time. ] $+ [ $address($knick,2) ] ]
  40. writeini helpdesk.ini Duty $address($knick,2) off
  41. inc %duty.count -1
  42. 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)
  43. unset %hd.kick
  44. unset %temp.time. $+ $address($knick,2)
  45. }
  46. }
  47. on *:connect: {
  48. if ($server == irc.psionicsinstitute.org) {
  49. writeini helpdesk.ini Duty *!*@Head.of.HelpDesk.and.Delicate.Affairs off
  50. writeini helpdesk.ini Duty *!*@Cat.Up.Leaf.HelpDesk.Trainee off
  51. writeini helpdesk.ini Duty *!*@I.R.Smart.PI.HelpDesk.Operator off
  52. writeini helpdesk.ini Duty *!*@Echo.of.Silence.Helpdesk.Trainee off
  53. writeini helpdesk.ini Duty *!*@PI.Helpdesk.Admin off
  54. set %duty.count 0
  55. unset %temp.time.*
  56. }
  57. }
  58. on *:quit: {
  59. set %hd.quit $address($nick,2)
  60. if (*!*@*HelpDesk* iswm %hd.quit) && ($readini(helpdesk.ini, Duty, $address($nick,2)) == on) {
  61. var %x = % [ $+ [ temp.time. ] $+ [ $address($nick,2) ] ]
  62. inc %total.time. $+ $address($nick,2) $calc($ctime - %x)
  63. var %y = % [ $+ [ total.time. ] $+ [ $address($nick,2) ] ]
  64. writeini helpdesk.ini Duty $address($nick,2) off
  65. inc %duty.count -1
  66. 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)
  67. unset %hd.quit
  68. }
  69. }
  70. on *:part:#Helpdesk: {
  71. if ($nick == $me) {
  72. writeini helpdesk.ini Duty *!*@Head.of.HelpDesk.and.Delicate.Affairs off
  73. writeini helpdesk.ini Duty *!*@Cat.Up.Leaf.HelpDesk.Trainee off
  74. writeini helpdesk.ini Duty *!*@I.R.Smart.PI.HelpDesk.Operator off
  75. writeini helpdesk.ini Duty *!*@Echo.of.Silence.Helpdesk.Trainee off
  76. writeini helpdesk.ini Duty *!*@PI.Helpdesk.Admin off
  77. set %duty.count 0
  78. unset %temp.time.*
  79. }
  80. set %hd.part $address($nick,2)
  81. if (*!*@*HelpDesk* iswm %hd.part) && ($readini(helpdesk.ini, Duty, $address($nick,2)) == on) {
  82. var %x = % [ $+ [ temp.time. ] $+ [ $address($nick,2) ] ]
  83. inc %total.time. $+ $address($nick,2) $calc($ctime - %x)
  84. var %y = % [ $+ [ total.time. ] $+ [ $address($nick,2) ] ]
  85. writeini helpdesk.ini Duty $address($nick,2) off
  86. inc %duty.count -1
  87. 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)
  88. unset %hd.part
  89. }
  90. }
  91. on *:join:#Helpdesk: {
  92. 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.
  93. }
  94. on *:nick: {
  95. set %hd.nickchng $address($newnick,2)
  96. if (*!*@*HelpDesk* iswm %hd.nickchng) {
  97. writeini helpdesk.ini Hosts $address($newnick,2) $newnick
  98. unset %hd.nickchng
  99. }
  100. }
  101.  
  102. 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 $+ . } }
  103. on *:text:*:#Helpdesk: {
  104. if ($1 == `add) {
  105. if ($address($nick,2) != *!*@Head.of.HelpDesk.and.Delicate.Affairs) {
  106. msg # It appears you do not have the correct clearance for that command, $nick $+ .
  107. halt
  108. }
  109. else {
  110. if ($2 !ison $chan) {
  111. msg # I'm sorry, but there doesn't appear to be a $2 on this channel.
  112. halt
  113. }
  114. else {
  115. writeini helpdesk.ini Duty $address($2,2) off
  116. writeini helpdesk.ini Hosts $address($2,2) $2
  117. 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.
  118. set %help.users $address($2,2) %help.users
  119. set %total.time. $+ $address($2,2) 0
  120. halt
  121. }
  122. }
  123. }
  124. if ($1 == `del) {
  125. if ($address($nick,2) != *!*@Head.of.HelpDesk.and.Delicate.Affairs) {
  126. msg # It appears you do not have the correct clearance for that command, $nick $+ .
  127. halt
  128. }
  129. else {
  130. remini helpdesk.ini Duty $address($2,2) off
  131. remini helpdesk.ini Hosts $address($2,2) $2
  132. msg # $2 successfully removed from the HelpOp list. :)
  133. unset %total.time. $+ $address($2,2) 0
  134. halt
  135. }
  136. }
  137. if ($1 == `on) && ($2 == duty) {
  138. if ($address($nick,2) !isin %help.users) {
  139. msg # Why are you trying to use that command, $nick $+ ?
  140. halt
  141. }
  142. else {
  143. if ($readini(helpdesk.ini, Duty, $address($nick,2)) == on) {
  144. notice $nick You're already marked as on duty, $nick $+ !
  145. halt
  146. }
  147. else {
  148. set %temp.time. $+ $address($nick,2) $ctime
  149. duty $nick on
  150. msg # $nick is now marked as on duty.
  151. }
  152. }
  153. }
  154. if ($1 == `off) && ($2 == duty) {
  155. if ($address($nick,2) !isin %help.users) {
  156. msg # Why are you trying to use that command, $nick $+ ?
  157. halt
  158. }
  159. else {
  160. if ($readini(helpdesk.ini, Duty, $address($nick,2)) == off) {
  161. notice $nick You're already marked as off duty, $nick $+ !
  162. halt
  163. }
  164. else {
  165. var %x = % [ $+ [ temp.time. ] $+ [ $address($nick,2) ] ]
  166. inc %total.time. $+ $address($nick,2) $calc($ctime - %x)
  167. var %y = % [ $+ [ total.time. ] $+ [ $address($nick,2) ] ]
  168. duty $nick off
  169. 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)
  170. unset %temp.time. $+ $address($nick,2)
  171. }
  172. }
  173. }
  174. if ($1 == `help) {
  175. if (%duty.count == 0) {
  176. msg # I'm sorry, there doesn't appear to be anyone on duty at the moment. D:
  177. msg $nick If you need ChanServ help, type /cs help. To help with a specific command, type /cs help [command]
  178. msg $nick If you need NickServ help, type /ns help. To help with a specific command, type /ns help [command]
  179. msg $nick If you need BotServ help, type /bs help. To help with a specific command, type /bs help [command]
  180. msg $nick If you need HostServ help, type /hs help. To help with a specific command, type /hs help [command]
  181. msg $nick If you need MemoServ help, type /ms help. To help with a specific command, type /ms help [command]
  182. msg $nick For a list of User commands, type /helpop usercmds
  183. msg $nick For a list of Oper commands, type /helpop opercmds
  184. msg $nick For a list of User modes, type /helpop umodes
  185. msg $nick For a list of Channel modes, type /helpop chmodes
  186. }
  187. else {
  188. if ($readini(helpdesk.ini, Duty, *!*@I.R.Smart.PI.HelpDesk.Operator) == on) {
  189. msg $readini(helpdesk.ini, Hosts, *!*@I.R.Smart.PI.HelpDesk.Operator) $nick requires assistance.
  190. }
  191. if ($readini(helpdesk.ini, Duty, *!*@Cat.Up.Leaf.Helpdesk.Trainee) == on) {
  192. msg $readini(helpdesk.ini, Hosts, *!*@Cat.Up.Leaf.Helpdesk.Trainee) $nick requires assistance.
  193. }
  194. if ($readini(helpdesk.ini, Duty, *!*@Head.of.HelpDesk.and.Delicate.Affairs) == on) {
  195. msg $readini(helpdesk.ini, Hosts, *!*@Head.of.HelpDesk.and.Delicate.Affairs) $nick requires assistance.
  196. }
  197. if ($readini(helpdesk.ini, Duty, *!*@PI.Helpdesk.Admin) == on) {
  198. msg $readini(helpdesk.ini, Hosts, *!*@PI.Helpdesk.Admin) $nick requires assistance.
  199. }
  200. if ($readini(helpdesk.ini, Duty, *!*@Echo.of.Silence.Helpdesk.Trainee) == on) {
  201. msg $readini(helpdesk.ini, Hosts, *!*@Echo.of.Silence.Helpdesk.Trainee) $nick requires assistance.
  202. }
  203. }
  204. }
  205. if ($1 == `list) {
  206. if (%duty.count == 0) {
  207. msg # I'm sorry, there doesn't appear to be anyone on duty at the moment. D:
  208. msg $nick If you need ChanServ help, type /cs help. To help with a specific command, type /cs help [command]
  209. msg $nick If you need NickServ help, type /ns help. To help with a specific command, type /ns help [command]
  210. msg $nick If you need BotServ help, type /bs help. To help with a specific command, type /bs help [command]
  211. msg $nick If you need HostServ help, type /hs help. To help with a specific command, type /hs help [command]
  212. msg $nick If you need MemoServ help, type /ms help. To help with a specific command, type /ms help [command]
  213. msg $nick For a list of User commands, type /helpop usercmds
  214. msg $nick For a list of Oper commands, type /helpop opercmds
  215. msg $nick For a list of User modes, type /helpop umodes
  216. msg $nick For a list of Channel modes, type /helpop chmodes
  217. }
  218. else {
  219. if (%duty.count == 1) {
  220. msg # There is currently %duty.count person on duty.
  221. }
  222. elseif (%duty.count >= 2) {
  223. msg # There are currently %duty.count people on duty.
  224. }
  225. if ($readini(helpdesk.ini, Duty, *!*@Head.of.HelpDesk.and.Delicate.Affairs) == on) {
  226. var %temp = %temp.time.*!*@Head.of.HelpDesk.and.Delicate.Affairs
  227. msg # $readini(helpdesk.ini, Hosts, *!*@Head.of.HelpDesk.and.Delicate.Affairs) has been on duty for $duration($calc($ctime - %temp)) $+ .
  228. }
  229. if ($readini(helpdesk.ini, Duty, *!*@Cat.Up.Leaf.Helpdesk.Trainee) == on) {
  230. var %temp = %temp.time.*!*@Cat.Up.Leaf.Helpdesk.Trainee
  231. msg # $readini(helpdesk.ini, Hosts, *!*@Cat.Up.Leaf.Helpdesk.Trainee) has been on duty for $duration($calc($ctime - %temp)) $+ .
  232. }
  233. if ($readini(helpdesk.ini, Duty, *!*@I.R.Smart.PI.HelpDesk.Operator) == on) {
  234. var %temp = %temp.time.*!*@I.R.Smart.PI.HelpDesk.Operator
  235. msg # $readini(helpdesk.ini, Hosts, *!*@I.R.Smart.PI.HelpDesk.Operator) has been on duty for $duration($calc($ctime - %temp)) $+ .
  236. }
  237. if ($readini(helpdesk.ini, Duty, *!*@PI.Helpdesk.Admin) == on) {
  238. var %temp = %temp.time.*!*@PI.Helpdesk.Admin
  239. msg # $readini(helpdesk.ini, Hosts, *!*@PI.Helpdesk.Admin) has been on duty for $duration($calc($ctime - %temp)) $+ .
  240. }
  241. if ($readini(helpdesk.ini, Duty, *!*@Echo.of.Silence.Helpdesk.Trainee) == on) {
  242. var %temp = %temp.time.*!*@Echo.of.Silence.Helpdesk.Trainee
  243. msg # $readini(helpdesk.ini, Hosts, *!*@Echo.of.Silence.Helpdesk.Trainee) has been on duty for $duration($calc($ctime - %temp)) $+ .
  244. }
  245. }
  246. }
  247. if ($1 == `time && $2 ison $chan) {
  248. set %hd.time $address($2,2)
  249. if (*!*@*HelpDesk* iswm %hd.time) {
  250. var %y = % [ $+ [ total.time. ] $+ [ $address($2,2) ] ]
  251. 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.)
  252. unset %hd.time
  253. }
  254. }
  255. if ($1 == `idle && $2 ison $chan) {
  256. whois $2
  257. set %check yes
  258. set %check.chan $chan
  259. }
  260. }
  261.  
  262.  
  263.  
  264. alias duty {
  265. writeini helpdesk.ini Duty $address($1,2) $2
  266. if ($2 == on) { inc %duty.count 1 }
  267. if ($2 == off) { inc %duty.count -1 }
  268. }
  269. alias hdreset {
  270. remini helpdesk.ini Hosts
  271. remini helpdesk.ini Duty
  272. unset %total.time*
  273. unset %help.users
  274. set %duty.count 0
  275. }
Add Comment
Please, Sign In to add comment