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.
Old posts that have not been replied to for several years.
-
simonbell
- Halfop
- Posts: 68
- Joined: Mon Aug 05, 2002 8:07 pm
- Location: Washington, England
-
Contact:
Post
by simonbell »
Hi
Im trying to add a channel ban using this script:
proc pub_addlamer {nick uhost hand chan text} {
set toban [lindex $text 0]
set reason [lindex $text 1]
if { [onchan $toban] == 1 } {
newchanban $chan $toban![getchanhost $toban] $hand $reason 0
}
}
I get no error message, but as far as i can see by typing .bans in the partyline no ban is added for the channel.
Have i missed something obvious out?
Simon
-
T
Thor
Post
by Thor »
i have had some problems with .bans command
Try a .bans #chan
or .console #chan and .bans
the command of your code seems to be
!addlamer nick reason
if nick is not on chan, the chan ban is not created
-
Weirdo
- Master
- Posts: 265
- Joined: Sat Apr 27, 2002 8:00 pm
- Location: Manchester, England
Post
by Weirdo »
consider adding validation
Code: Select all
if {[onchan $toban $chan] == 1} {
puthelp "notice $nick :That nick is not on channel" }
else
{ do the ban thing }
Code: Select all
newchanban $kchan [maskhost "$knick!$khost"] $botnick $w3rk_reason $bantime2
I think its the host bit of your code that screws up, not sure, but perhaps consider something simular to the extract above