From 568284cc9856028e92b3e85decb3db14b4949b23 Mon Sep 17 00:00:00 2001 From: steering7253 Date: Tue, 17 Dec 2024 15:37:35 -0700 Subject: add part command --- accountscript.tcl | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'accountscript.tcl') diff --git a/accountscript.tcl b/accountscript.tcl index 4a7abdd..ecf2eb1 100644 --- a/accountscript.tcl +++ b/accountscript.tcl @@ -139,3 +139,38 @@ proc acct_chflags {nick user hand chan text} { putserv "PRIVMSG $chan :$nick, you do not have access to ,chflags" } } + +bind PUB * ,part acct_part + +proc acct_part {nick user hand chan text} { + set accthand [finduser -account [getaccount $nick]] + if [string match $accthand "*"] { + putserv "PRIVMSG $chan :$nick, you are not authenticated to NickServ and/or I don't know you!" + return 1 + } + if {[matchattr $accthand +o]} { + channel remove [string trim $text] + putquick "PRIVMSG $chan :\[part\] removed [string trim $text]" + savechannels + } else { + putserv "PRIVMSG $chan :$nick, you do not have access to ,part" + } +} + +bind MSG * part acct_part_pm + +proc acct_part_pm {nick user hand text} { + set accthand [finduser -account [getaccount $nick]] + if [string match $accthand "*"] { + putserv "NOTICE $nick :you are not authenticated to NickServ and/or I don't know you!" + return 1 + } + if {[matchattr $accthand +o]} { + channel remove [string trim $text] + putquick "NOTICE $nick :\[part\] removed [string trim $text]" + putquick "PRIVMSG #fire-trail :\[part\] $nick ($accthand) removed [string trim $text]" + savechannels + } else { + putserv "NOTICE $nick :you do not have access to part" + } +} -- cgit v1.3.1-10-gc9f91