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.

Match ? character

Old posts that have not been replied to for several years.
Locked
s
scr0llwheel
Voice
Posts: 17
Joined: Fri Jan 03, 2003 12:37 am

Match ? character

Post by scr0llwheel »

Code: Select all

bind pubm - "* \?*" per:command
I want to match any text said in the channel starting with the character ?. But since ? is a "matching character" it accepts any and all text said on the channel. How can I escape the ? so it matches against it? And I don't want to put anything in the proc. I want it to be in the pubm bind.

-scr0llwheel
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

I aint particualy sure. Maybe it requires a physical slash.

This is done by escaping the excape code - EG

"* \\?*"
s
scr0llwheel
Voice
Posts: 17
Joined: Fri Jan 03, 2003 12:37 am

Post by scr0llwheel »

Ahh, yes, that works. I just tested it. Thanks

Good guess :P
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

This is because the string passes through the Tcl parser, before reaching eggdrop.

The Tcl parser, will convert escape codes. Thus we need to force a \ to be sent to eggdrop, by escaping the slash.
Locked