Code: Select all
puts $file "Channel Access List: ^B $arg ^B"
Code: Select all
putserv "PRIVMSG ChanServ@services.dal.net :SOP $arg LIST
Code: Select all
##
# DCsoplist2txt.tcl by DrugCheese for sergios
# 7-24-04
#
# Will write chanservs SOp list for a channel to filesystem
##
# Set the file name, the time of day , and the channel
bind msg n DCtest DCtest
proc DCtest {nick host hand arg} { WriteList 1 2 3 4 5 }
#set the filename to save to
#set SOpList "SOplist.txt"
set qfile soplist.txt
#set the time of day ( 1:05am )
bind time - "05 01 * * *" WriteList
#set the channel to check
set Channel "#parea"
#################################################
proc WriteList {mi ho dd mo ye} {
global Channel
putlog "DCsoplist2txt - sending request to chanserv"
putquick "chanserv :sop $Channel list"
}
# bind notc -|- ** IncomingNotice
proc IncomingNotice {nick host hand arg dest} {
# putlog "incoming NOTICE nick $nick $host host hand $hand arg $arg dest $dest"
global Channel
if {$nick != "ChanServ"} {
return 0
}
if {[string match *$Channel* $arg]} {
set file [open $::qfile w]
puts $file "$arg"
close $file
putlog "DCsoplist2txt - retrieved and written"
return 0
}
}
putlog "DCsoplist2txt loaded"
Code: Select all
<10:01am> -ChanServ- SOP list for #parea:
-
<10:01am> -ChanServ- * 1) TheKeyMaster (~TKM@patra-nirvana-273AAAFA.parea.pwn) (added by Sergios via: Sergios - (nirvana.netadmin.net) - Sun Feb 22 01:13:32 2004 EST)
-
<10:01am> -ChanServ- * 2) Jasonpap (fghj@patra-nirvana-F4B0DA7.parea.pwn) (added by Sergios via: Sergios - (nirvana.netadmin.net) - Wed Jan 07 22:29:00 2004 EST)
-
<10:01am> -ChanServ- * 3) Eirhnh (~Eirhnh@admin.nirvana.net) (added by Sergios via: Sergios - (nirvana.netadmin.net) - Wed Jan 07 22:53:21 2004 EST)
-
<10:01am> -ChanServ- End of List.
-
<10:01am> -ChanServ- Nicks with the aprotect setting enabled are bold and are marked with a '*'. If an access mask has been set for an entry, the mask is also being printed in bold letters.
Code: Select all
#Set the filename to save the access list records in.
set accesslist "accesslist.txt"
if {![file exists $accesslist]} {
putlog "ACCESS LIST FILE:\002 $accesslist \002file \002does not exist\002, *creating file*: \002$accesslist\002"
set file [open $accesslist "w"]
puts $file "-ChanServ Access List Records-\n"
close $file
}
bind msgm n !chanserv get:access:list
bind notc - save:access:list
proc get:access:list {nick uhost hand text} {
set type [lindex $text 0]; set chan [lindex $text 1]
if {([string equal -nocase "list" [lindex $text 2]])} {
putquick "PRIVMSG chanserv :$type $chan list"
}
}
proc save:access:list {nick uhost hand text {dest ""}} {
global botnick accesslist
if {(![string equal -nocase $botnick $dest]) || ([string match -nocase "#*" $dest])} { return 0 }
if {([string equal $nick "ChanServ"]) && ([string equal $uhost "services@irc.net"])} {
if {(([string match "*)" [lindex $text 1]]) && ([string match "(*@*)" [lindex $text 3]]) && ([string equal "(added" [lindex $text 4]]) && ([string equal "by" [lindex $text 5]])) || (([string match "*?OP list for*" $text]) || ([string equal "End of List" $text]))} {
if {![file exists $accesslist]} { set file [open $accesslist "w"]; puts $file "-ChanServ Access List Records-\n"; close $file }
set file [open $accesslist "a"]; puts $file $text; close $file
return 0
}
}
}
Okay, I haven't tested this so.. I am not sure. But something like this should definately work, with the output of your chanserv's access list.Usage: /msg <botnick> !chanserv <AOP|SOP|AKICK> <#channel> list
and i open the file i see this part/msg eirhnh !chanserv sop #parea list
Code: Select all
-ChanServ Access List Records-
Code: Select all
if {(![string equal -nocase $botnick $dest]) || ([string match -nocase "#*" $dest])} { return 0 }
Code: Select all
putlog "$text"