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.

command after which bot stops running a procedure

Old posts that have not been replied to for several years.
Locked
g
gregul

Post by gregul »

i mean something like return 0, but i want my bot not to check any line after it, is there such command?
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

depends in which situation you want to use it!

retrun does this job for you, exactly as you said

eg

Code: Select all

proc pub:bind {nick uh hand chan arg} {
  puthelp "PRIVMSG #chan :This I have to say"
  return
  puthelp "PRIVMSG #chan :Chasing sheep! - thank god they can't see this"
}
The first puthelp would run, the second wouldn't
g
gregul

Post by gregul »

i talk about superbitch script, i want my bot immediately stop running a proc if he see that user who gave ops matches +m, or bot matches ![botisop $chan] ... without checking lines after return 0
i can test it for example erasing close bracket in a line after 'return 0', bot'll return an error msg instead of stop running a proc
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Code: Select all

proc mode:bind {nick uh hand chan mc vict} {
 if {[matchattr $hand "m"] || ![botisop $chan]} { return }
 rest of code goes here
}
Locked