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.

Host help

Old posts that have not been replied to for several years.
Locked
p
peteoc

Host help

Post by peteoc »

Code: Select all

bind pub - !host host

proc host {nick host hand chan} {
putserv "PRIVMSG $chan : your host is $host"
}
putlog "loaded ukhs script"
I have this and it gives this error
Tcl error [host]: called "host" with too many arguments


I also have this

Code: Select all

bind join - "*" ukhsjoin

proc ukhsjoin {nick host hand chan} {
if {$host == "someone.called.player.killed-me.co.uk"} {
pushmode $chan +v $nick
putserv "PRIVMSG $nick : your host is $host"
}
}
first of all when someone with the host someone.called.player.killed-me.co.uk joins it doesn't voice them, second of all i'd like it to read from a file where the hosts would be stored.

cheers to anyone that helps me!!
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

First off, try reading tcl-commands.doc.

The proc you used for the !host command is incorrect. The error states "too many arguments". Witht he "host" proc only having 4, the script must be being called with 5 or more.

When reading tcl-commands.doc, it defines a PUB type bind as having 5.

As for the second issue.

The $host variable, doesn't just contain the host of the user. It actualy contains the user@host.

Nicknames on IRC are represented as nick!user@host.name. The user part is your ident.

As such, you have to take account for this.
Locked