This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

force ban list refresh

Old posts that have not been replied to for several years.
Locked
b
b_raven
Voice
Posts: 6
Joined: Tue Jul 20, 2004 1:43 am

force ban list refresh

Post by b_raven »

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
}
}
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

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.

Code: Select all

#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.

Module: irc
It would be something like this:

Code: Select all

bind mode - "+o" get:banlist

proc get:banlist {nick uhost hand chan mode target} {
 global botnick
  if {([string equal "ChanServ" $nick]) && ([string equal "+o" $mode]) && ([isbotnick $target])} {
  chanbans $chan; return 0
  }
}
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
b
b_raven
Voice
Posts: 6
Joined: Tue Jul 20, 2004 1:43 am

Post by b_raven »

WEEE! The putfast identing worked. didn't think about that.
Thanks.
User avatar
user
&nbsp;
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

awyeah wrote:As for getting the channel banlist you would have to use:
(Taken from eggdrop/doc/tcl-commands.doc)
He wants to update the internal banlist, not fetch its current (empty) contents.

Code: Select all

putserv "MODE $chan +b"
should work
Have you ever read "The Manual"?
Locked