I have a slight problem on the server my bot is on.
The server will only give op to the bot either after it has identified for a nick, or when it sends a chanserv password. And it will only give the ban list to ops.
The problem is that the bot enters the channel before it identifies, (and then identifies for the channel op), meaning it doesn't get the ban list from the channel.
I need some way to make it get the ban list from the server when it gets op.
I have a script that triggers correctly on the mode change, but I can't seem to find the command to make it get the ban list. I've tried "resetchan" but that doesn't seem to work.
Any help would be apreciated.
Current script follows:
bind mode - "* +o" get_access_list
proc get_access_list {nick uhost handle channel mode victim} {
if {[string match -nocase "Bester" $victim]} {
resetchan $channel
}
}
So do you want your bot to identify before it joins that channel?
This script should trigger before the bot joins any channel, meaning its nick would be identified before it joins any channel.
#Set the password of the botsnick
set nickpass "irule"
bind evnt - init-server nickserv:identify
proc nickserv:identify {type} {
global nickpass
putquick "PRIVMSG nickserv :IDENTIFY $nickpass" -next
return 0
}
As for getting the channel banlist you would have to use:
(Taken from eggdrop/doc/tcl-commands.doc)
chanbans <channel>
Returns: a list of the current bans on the channel. Each element is a sublist of the form {<ban> <bywho> <age>}. age is seconds from the bot's point of view.