Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on *:kick:#Helpdesk: {
- set %hd.kick $address($knick,2)
- if (*!*@*HelpDesk* iswm %hd.kick) {
- if ($readini(helpdesk.ini, Duty, $address($knick,2)) == on) {
- var %x = % [ $+ [ temp.time. ] $+ [ $address($knick,2) ] ]
- inc %total.time. $+ $address($knick,2) $calc($ctime - %x)
- var %y = % [ $+ [ total.time. ] $+ [ $address($knick,2) ] ]
- writeini helpdesk.ini Duty $address($knick,2) off
- inc %duty.count -1
- 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)
- unset %hd.kick
- unset %temp.time. $+ $address($knick,2)
- }
- }
- }
- on *:quit: {
- set %hd.quit $address($nick,2)
- if (*!*@*HelpDesk* iswm %hd.quit) {
- if ($readini(helpdesk.ini, Duty, $address($nick,2)) == on) {
- var %x = % [ $+ [ temp.time. ] $+ [ $address($nick,2) ] ]
- inc %total.time. $+ $address($nick,2) $calc($ctime - %x)
- var %y = % [ $+ [ total.time. ] $+ [ $address($nick,2) ] ]
- writeini helpdesk.ini Duty $address($nick,2) off
- inc %duty.count -1
- 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)
- unset %hd.quit
- }
- }
- }
- on *:part:#Helpdesk: {
- set %hd.part $address($nick,2)
- if (*!*@*HelpDesk* iswm %hd.part) {
- if ($readini(helpdesk.ini, Duty, $address($nick,2)) == on) {
- var %x = % [ $+ [ temp.time. ] $+ [ $address($nick,2) ] ]
- inc %total.time. $+ $address($nick,2) $calc($ctime - %x)
- var %y = % [ $+ [ total.time. ] $+ [ $address($nick,2) ] ]
- writeini helpdesk.ini Duty $address($nick,2) off
- inc %duty.count -1
- 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)
- unset %hd.part
- }
- }
- }
- on *:join:#Helpdesk: {
- 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.
- }
- on *:nick: {
- set %hd.nickchng $address($newnick,2)
- if (*!*@*HelpDesk* iswm %hd.nickchng) {
- writeini helpdesk.ini Hosts $address($newnick,2) $newnick
- unset %hd.nickchng
- }
- }
- 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 $+ . } }
- on *:text:*:#Helpdesk: {
- if ($1 == `add) {
- if ($address($nick,2) != *!*@Head.of.HelpDesk.and.Delicate.Affairs) {
- msg # It appears you do not have the correct clearance for that command, $nick $+ .
- halt
- }
- else {
- if ($2 !ison $chan) {
- msg # I'm sorry, but there doesn't appear to be a $2 on this channel.
- halt
- }
- else {
- writeini helpdesk.ini Duty $address($2,2) off
- writeini helpdesk.ini Hosts $address($2,2) $2
- 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.
- set %help.users $address($2,2) %help.users
- set %total.time. $+ $address($2,2) 0
- halt
- }
- }
- }
- if ($1 == `del) {
- if ($address($nick,2) != *!*@Head.of.HelpDesk.and.Delicate.Affairs) {
- msg # It appears you do not have the correct clearance for that command, $nick $+ .
- halt
- }
- else {
- remini helpdesk.ini Duty $address($2,2) off
- remini helpdesk.ini Hosts $address($2,2) $2
- msg # $2 successfully removed from the HelpOp list. :)
- unset %total.time. $+ $address($2,2) 0
- halt
- }
- }
- if ($1 == `on) && ($2 == duty) {
- if ($address($nick,2) !isin %help.users) {
- msg # Why are you trying to use that command, $nick $+ ?
- halt
- }
- else {
- if ($readini(helpdesk.ini, Duty, $address($nick,2)) == on) {
- notice $nick You're already marked as on duty, $nick $+ !
- halt
- }
- else {
- set %temp.time. $+ $address($nick,2) $ctime
- inc %duty.count 1
- duty $nick on
- msg # $nick is now marked as on duty.
- }
- }
- }
- if ($1 == `off) && ($2 == duty) {
- if ($address($nick,2) !isin %help.users) {
- msg # Why are you trying to use that command, $nick $+ ?
- halt
- }
- else {
- if ($readini(helpdesk.ini, Duty, $address($nick,2)) == off) {
- notice $nick You're already marked as off duty, $nick $+ !
- halt
- }
- else {
- var %x = % [ $+ [ temp.time. ] $+ [ $address($nick,2) ] ]
- inc %total.time. $+ $address($nick,2) $calc($ctime - %x)
- var %y = % [ $+ [ total.time. ] $+ [ $address($nick,2) ] ]
- inc %duty.count -1
- duty $nick off
- 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)
- unset %temp.time. $+ $address($nick,2)
- }
- }
- }
- if ($1 == `help) {
- if (%duty.count == 0) {
- msg # I'm sorry, there doesn't appear to be anyone on duty at the moment. D:
- msg $nick If you need ChanServ help, type /cs help. To help with a specific command, type /cs help [command]
- msg $nick If you need NickServ help, type /ns help. To help with a specific command, type /ns help [command]
- msg $nick If you need BotServ help, type /bs help. To help with a specific command, type /bs help [command]
- msg $nick If you need HostServ help, type /hs help. To help with a specific command, type /hs help [command]
- msg $nick If you need MemoServ help, type /ms help. To help with a specific command, type /ms help [command]
- msg $nick For a list of User commands, type /helpop usercmds
- msg $nick For a list of Oper commands, type /helpop opercmds
- msg $nick For a list of User modes, type /helpop umodes
- msg $nick For a list of Channel modes, type /helpop chmodes
- }
- else {
- if ($readini(helpdesk.ini, Duty, *!*@I.R.Smart.PI.HelpDesk.Operator) == on) {
- msg $readini(helpdesk.ini, Hosts, *!*@I.R.Smart.PI.HelpDesk.Operator) $nick requires assistance.
- }
- if ($readini(helpdesk.ini, Duty, *!*@Cat.Up.Leaf.Helpdesk.Trainee) == on) {
- msg $readini(helpdesk.ini, Hosts, *!*@Cat.Up.Leaf.Helpdesk.Trainee) $nick requires assistance.
- }
- if ($readini(helpdesk.ini, Duty, *!*@Head.of.HelpDesk.and.Delicate.Affairs) == on) {
- msg $readini(helpdesk.ini, Hosts, *!*@Head.of.HelpDesk.and.Delicate.Affairs) $nick requires assistance.
- }
- if ($readini(helpdesk.ini, Duty, *!*@PI.Helpdesk.Admin) == on) {
- msg $readini(helpdesk.ini, Hosts, *!*@PI.Helpdesk.Admin) $nick requires assistance.
- }
- if ($readini(helpdesk.ini, Duty, *!*@Echo.of.Silence.Helpdesk.Trainee) == on) {
- msg $readini(helpdesk.ini, Hosts, *!*@Echo.of.Silence.Helpdesk.Trainee) $nick requires assistance.
- }
- }
- }
- if ($1 == `list) {
- if (%duty.count == 0) {
- msg # I'm sorry, there doesn't appear to be anyone on duty at the moment. D:
- msg $nick If you need ChanServ help, type /cs help. To help with a specific command, type /cs help [command]
- msg $nick If you need NickServ help, type /ns help. To help with a specific command, type /ns help [command]
- msg $nick If you need BotServ help, type /bs help. To help with a specific command, type /bs help [command]
- msg $nick If you need HostServ help, type /hs help. To help with a specific command, type /hs help [command]
- msg $nick If you need MemoServ help, type /ms help. To help with a specific command, type /ms help [command]
- msg $nick For a list of User commands, type /helpop usercmds
- msg $nick For a list of Oper commands, type /helpop opercmds
- msg $nick For a list of User modes, type /helpop umodes
- msg $nick For a list of Channel modes, type /helpop chmodes
- }
- else {
- if ($readini(helpdesk.ini, Duty, *!*@Head.of.HelpDesk.and.Delicate.Affairs) == on) {
- var %temp = %temp.time.*!*@Head.of.HelpDesk.and.Delicate.Affairs
- msg # $readini(helpdesk.ini, Hosts, *!*@Head.of.HelpDesk.and.Delicate.Affairs) is currently on duty, and has been for $duration($calc($ctime - %temp)) $+ .
- }
- if ($readini(helpdesk.ini, Duty, *!*@Cat.Up.Leaf.Helpdesk.Trainee) == on) {
- var %temp = %temp.time.*!*@Cat.Up.Leaf.Helpdesk.Trainee
- msg # $readini(helpdesk.ini, Hosts, *!*@Cat.Up.Leaf.Helpdesk.Trainee) is currently on duty, and has been for $duration($calc($ctime - %temp)) $+ .
- }
- if ($readini(helpdesk.ini, Duty, *!*@I.R.Smart.PI.HelpDesk.Operator) == on) {
- var %temp = %temp.time.*!*@I.R.Smart.PI.HelpDesk.Operator
- msg # $readini(helpdesk.ini, Hosts, *!*@I.R.Smart.PI.HelpDesk.Operator) is currently on duty, and has been for $duration($calc($ctime - %temp)) $+ .
- }
- if ($readini(helpdesk.ini, Duty, *!*@PI.Helpdesk.Admin) == on) {
- var %temp = %temp.time.*!*@PI.Helpdesk.Admin
- msg # $readini(helpdesk.ini, Hosts, *!*@PI.Helpdesk.Admin) is currently on duty, and has been for $duration($calc($ctime - %temp)) $+ .
- }
- if ($readini(helpdesk.ini, Duty, *!*@Echo.of.Silence.Helpdesk.Trainee) == on) {
- var %temp = %temp.time.*!*@Echo.of.Silence.Helpdesk.Trainee
- msg # $readini(helpdesk.ini, Hosts, *!*@Echo.of.Silence.Helpdesk.Trainee) is currently on duty, and has been for $duration($calc($ctime - %temp)) $+ .
- }
- }
- }
- if ($1 == `time) {
- if ($2 ison $chan) {
- set %hd.time $address($2,2)
- if (*!*@*HelpDesk* iswm %hd.time) {
- var %y = % [ $+ [ total.time. ] $+ [ $address($2,2) ] ]
- 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.)
- unset %hd.time
- }
- }
- }
- }
- alias duty {
- writeini helpdesk.ini Duty $address($1,2) $2
- }
- alias hdreset {
- unset %total.time*
- unset %help.users
- set %duty.count 0
- }
Add Comment
Please, Sign In to add comment