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.

banlist.tcl error

Old posts that have not been replied to for several years.
Locked
s
smds
Voice
Posts: 22
Joined: Mon Sep 15, 2003 6:11 pm

banlist.tcl error

Post by smds »

keep getting this tcl error, dont know what it is:
no value given for parameter "host" to "banlist"

Code: Select all

bind PUB o banlist pub:banlist
 proc pub:banlist { nick host hand chan text } {
 set target [getuser $hand XTRA TARGET]
 	set type ""
	set bans ""
	if { [llength $text] < 1 } {
	set bans [banlist $chan]
	set type $chan
} else {
	if { [matchattr $hand A] && [string tolower [lindex $text 0]] == "global" } {
	set bans [banlist]
	set type "global"
	} 
	if { [string tolower [lindex $text 0]] == "all" } {
	for { set x 0 } { $x < [llength [channels]] } { incr x } {
	set bans "$bans [banlist [lindex [channels] $x]]"
	}
	set bans "$bans [banlist]"
	set type "all"
  }
}
  if { [llength $bans] < 1 } { 
  puthelp "$target $nick :There are no bans to list for $type."
 } else { 
  puthelp "$target $nick :Listing bans for $type"
	for { set x 0 } { $x < [llength $bans] } { incr x } {
	set list 	[lindex $bans $x]
	set banned 	[lindex $list 0]
	set comment	[lindex $list 1]
	set expire	[lindex $list 2]
	set creator	[lindex $list 5]
  if { $expire == 0 } { set expire "never" 
 } else { set expire [ctime $expire] }
  puthelp "$target $nick :$x - Mask: $banned, Reason: $comment, Expires: $expire, Creator: $creator"
	}
   }
}
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Remove the extra spaces inside the proc, like from:

Code: Select all

proc pub:banlist { nick host hand chan text } {
should be:

Code: Select all

proc pub:banlist {nick host hand chan text} {
Once the game is over, the king and the pawn go back in the same box.
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Post by strikelight »

caesar wrote:Remove the extra spaces inside the proc, like from:

Code: Select all

proc pub:banlist { nick host hand chan text } {
should be:

Code: Select all

proc pub:banlist {nick host hand chan text} {
irrelevant..the spaces are fine.

from the look of the error message, you have a proc from another script called 'banlist' (maybe as you originally were writing this script, you didn't name the proc 'pub:banlist', but rather 'banlist'? In which case, you will have to .restart , not .rehash).
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Irrelevant or not it looks *ugly*.. :P
Once the game is over, the king and the pawn go back in the same box.
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Post by strikelight »

caesar wrote:Irrelevant or not it looks *ugly*.. :P
Beauty is in the eye of the beholder.
s
smds
Voice
Posts: 22
Joined: Mon Sep 15, 2003 6:11 pm

Post by smds »

lol ugly. well, the proc and bind were originally called 'banlist'
but a few errors ago i changed it to pub:banlist
there is no other script or anything with a proc/bind
called banlist, i'll try killing it and see what happnes.
thanks for the help.
s
smds
Voice
Posts: 22
Joined: Mon Sep 15, 2003 6:11 pm

Post by smds »

works fine now, thanks both :)
Locked