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.

isvoice and channel error

Old posts that have not been replied to for several years.
Locked
A
AjK

Post by AjK »

Hi All

I have a simple script as follows....

bind nick - * checknick
proc checknick {nick uhost hand chan newnick} {
if { [isvoice $newnick $chan] } {
... do something if voiced
return
} else {
... if not voice do something else
}
}
}

Now, when a user changes their nickname and they are voiced, the if {} works fine. However, if they are not voiced I expected the else {} to execute, however, it doestn't and I get the following error message in the log....

TCL error [checknick]: can not find channel named "file9"

The last bit, "file9" changes, sometimes "file7" etc. Anyone know why it's failing? What have I missed here?

cheers
AjK
I
Ian-Highlander
Op
Posts: 165
Joined: Mon Sep 24, 2001 8:00 pm
Location: Ely, Cambridgeshire

Post by Ian-Highlander »

Take the "Return" out and put it below the } else { section.

Code: Select all

bind nick - * checknick 
proc checknick {nick uhost hand chan newnick} { 
if { [isvoice $newnick $chan] } { 
... do something if voiced 
} else { 
... if not voice do something else 
} 
}
return 
} 
as far as the file9 error we'd need to see the rest of the code to see what its doing.

Regards

Ian-Highlander

_________________
If the automobile had followed the same development cycle as the computer, a Rolls-Royce today would cost £100, get a million miles to the gallon, and explode once every few weeks, killing everyone inside.

http://www.eggdropsrus.co.uk

<font size=-1>[ This Message was edited by: Ian-Highlander on 2002-04-08 05:38 ]</font>

<font size=-1>[ This Message was edited by: Ian-Highlander on 2002-04-08 05:39 ]</font>
A
AjK

Post by AjK »

Thx for the fast response on that, however, I found that the problem did in fact reside between the chair and the keyboard! (doh!)

cheers
AjK
Locked