Code: Select all
# Author: tomekk
# e-mail: tomekk/@/oswiecim/./eu/./org
# home page: http://tomekk.oswiecim.eu.org/
#
# Version 0.1
#
# This file is Copyrighted under the GNU Public License.
# http://www.gnu.org/copyleft/gpl.html
# file with nicks
set nicks_db "lusers.txt"
# service name
set service_name "chanserv"
#################################################################################
bind pub - list do_query
bind notc - "*" grab_list
proc do_query { nick uhost hand chan arg } {
global service_name nicks_db
if {[file exists $nicks_db]} {
file delete $nicks_db
}
putserv "PRIVMSG $service_name :vop $chan list"
}
proc grab_list { nick uhost hand text {dest ""}} {
global botnick service_name nicks_db
if {$dest == ""} {
set dest $botnick
}
if {([isbotnick $dest]) && ([string tolower $nick] == $service_name)} {
set split_text [split $text "\n"]
set db_hand [open $nicks_db a]
foreach text_line $split_text {
if {[regexp {^([0-9]+):.+$} $text_line]} {
set only_nick [string trim [lindex [split $text_line] 1]]
regsub -all -nocase {\002} $only_nick "" only_nick
puts $db_hand $only_nick
}
}
close $db_hand
}
}
putlog "chanserv-list.tcl ver 0.1 by tomekk loaded"
Code: Select all
bind pub - list do_query
Code: Select all
bind pub n list do_query
and after typing "list" on chan, bot:0:55:16 <tomekk> vop #tomekk-test list
10:55:17 -ChanServ(ChanServ@services.shadow-dragon.net)- VOP list for #tomekk-test:
10:55:17 -ChanServ(ChanServ@services.shadow-dragon.net)- 1: test (not logged in)
10:55:17 -ChanServ(ChanServ@services.shadow-dragon.net)- 2: test2 (not logged in)
10:55:17 -ChanServ(ChanServ@services.shadow-dragon.net)- 3: test3 (not logged in)
10:55:17 -ChanServ(ChanServ@services.shadow-dragon.net)- Total of 3 entry in VOP list of #tomekk-test.
try to change "bind pub - list do_query" to "bind pub - !test do_query" and after that write "!test" on your channel[tomekk@zonk]:~/eggdrop# cat lusers.txt
test
test2
test3
I note only difference to yours in that yours indicated the end of the list
[22:15] <TestBot> [00:13] -ChanServ (services@eagle-nest.net)- VOP list for #test:
[22:15] <TestBot> [00:13] -ChanServ (services@eagle-nest.net)- Num Nick
[22:15] <TestBot> [00:13] -ChanServ (services@eagle-nest.net)- 4 PeaceKeeper
[22:15] <TestBot> [00:13] -ChanServ (services@eagle-nest.net)- 5 cdclub
as you can see the lusers file is created however contains absolutely nothing - any ideas?
testserver@command:~/botroom/testbot$ cat lusers.txt
testserver@command:~/botroom/testbot$
yap, its a little bit diffrent, try this one:PaulyboyUK wrote:Ok m8 thankyou for your help - heres wheres it at currently - if i do a vop list - or do list with your script below is what i see returned when i am in partyline chat with bot
I note only difference to yours in that yours indicated the end of the list
[22:15] <TestBot> [00:13] -ChanServ (services@eagle-nest.net)- VOP list for #test:
[22:15] <TestBot> [00:13] -ChanServ (services@eagle-nest.net)- Num Nick
[22:15] <TestBot> [00:13] -ChanServ (services@eagle-nest.net)- 4 PeaceKeeper
[22:15] <TestBot> [00:13] -ChanServ (services@eagle-nest.net)- 5 cdclub
as you can see the lusers file is created however contains absolutely nothing - any ideas?
testserver@command:~/botroom/testbot$ cat lusers.txt
testserver@command:~/botroom/testbot$
Cheers
Paul
Code: Select all
# Author: tomekk
# e-mail: tomekk/@/oswiecim/./eu/./org
# home page: http://tomekk.oswiecim.eu.org/
#
# Version 0.1
#
# This file is Copyrighted under the GNU Public License.
# http://www.gnu.org/copyleft/gpl.html
# file with nicks
set nicks_db "lusers.txt"
# service name
set service_name "chanserv"
#################################################################################
bind pub - list do_query
bind notc - "*" grab_list
proc do_query { nick uhost hand chan arg } {
global service_name nicks_db
if {[file exists $nicks_db]} {
file delete $nicks_db
}
putserv "PRIVMSG $service_name :sop $chan list"
}
proc grab_list { nick uhost hand text {dest ""}} {
global botnick service_name nicks_db
if {$dest == ""} {
set dest $botnick
}
if {([isbotnick $dest]) && ([string tolower $nick] == [string tolower $service_name])} {
set text_line $text
set db_hand [open $nicks_db a]
if {[regexp {^.*([0-9]+).*$} $text_line]} {
set only_nick [lindex [split [string trim $text_line]] 2]
puts $db_hand $only_nick
}
close $db_hand
}
}
putlog "chanserv-list.tcl ver 0.1 by tomekk loaded"