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.
Old posts that have not been replied to for several years.
Nexus6
Op
Posts: 114 Joined: Mon Sep 02, 2002 4:41 am
Location: Tuchola, Poland
Post
by Nexus6 » Sun Sep 29, 2002 1:03 pm
Hi, bot should putlog when pattern matches string, it's not a prob to determine which pattern matches but I wanna know if it matches $nick or $user2 or both.
if {([string match $rnn $nick]) || ([string match $rnn $user2])} {
putlog "$rnn matched ..."
}
Thanks in advance
ppslim
Revered One
Posts: 3914 Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England
Post
by ppslim » Sun Sep 29, 2002 1:48 pm
You just have to use a little more logic in this sort of thing.
Code: Select all
if {([string match $rnn $nick]) && ([string match $rnn $user2])} {
putlog "$rnn matched both..."
} elseif {[string match $nn $nick]} {
putlog "$rnn matched nick..."
} elseif {[string match $rnn $user2]} {
putlog "$rnn matched user2..."
} else {
putlog "I didn't match any
}