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.

I need a rezolve

Old posts that have not been replied to for several years.
Locked
User avatar
duofruo
Halfop
Posts: 94
Joined: Thu Oct 23, 2003 3:17 pm
Location: Ploiesti@.ro
Contact:

I need a rezolve

Post by duofruo »

I have this tcl code

Code: Select all

proc !xadduser {nick host hand chan arg} {
        if {![onchan X $chan]} {return 0}
        global lol botnick
        if {![check $hand $nick $host]} {
                if {$lol(silent) == 1 || [checksilent $hand]} {return 0}
            puthelp "NOTICE $nick :You need to be identified to use this function."
                return 0
        }
        if {[llength $arg] < 1} {
                puthelp "NOTICE $nick :\002Usage\002!xadduser <username> <access>"
                return 0
        }
        putserv "privmsg X :adduser $chan $arg"
        putserv "privmsg $chan :typing command /msg X adduser \00302$chan\003 $arg"
        return 0
}
This is part of a script. But i wana add something. When X in not on chan to say something like

Code: Select all

Sorry X is not prezent on chan.
I can`t find the corect conditions. I put something but he olso wrote the second thing
Embrace The Inevitable
User avatar
caesar
Mint Rubber
Posts: 3776
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Have you even bothered to check the doc/tcl-commands.doc file for an answer?

Code: Select all

if {[onchan $chan X]} { # do your stuff }
Once the game is over, the king and the pawn go back in the same box.
User avatar
duofruo
Halfop
Posts: 94
Joined: Thu Oct 23, 2003 3:17 pm
Location: Ploiesti@.ro
Contact:

Post by duofruo »

Code: Select all

if {![onchan X $chan]} {puthelp "privmsg $chan :Sorry but i can`t see \00302X\003 on this channel."
              return 0
        }
cool . thx
Embrace The Inevitable
User avatar
duofruo
Halfop
Posts: 94
Joined: Thu Oct 23, 2003 3:17 pm
Location: Ploiesti@.ro
Contact:

Post by duofruo »

Heh. i found out the ! is the oposite of the condition

Code: Select all

{![onchan X $chan]} 
Embrace The Inevitable
User avatar
arcane
Master
Posts: 280
Joined: Thu Jan 30, 2003 9:18 am
Location: Germany
Contact:

Post by arcane »

yes, you are a _real_ master...
aVote page back online!
Check out the most popular voting script for eggdrop bots.

Join the metal tavern!
User avatar
caesar
Mint Rubber
Posts: 3776
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

omg, that's an miracle! had anyone got this on film? :mrgreen:
Once the game is over, the king and the pawn go back in the same box.
User avatar
duofruo
Halfop
Posts: 94
Joined: Thu Oct 23, 2003 3:17 pm
Location: Ploiesti@.ro
Contact:

Post by duofruo »

ha ha ha . laught about the beginner.
:lol:
Embrace The Inevitable
Locked