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.

bind pubm and '#' charactor issue

Old posts that have not been replied to for several years.
Locked
D
DayCuts
Voice
Posts: 37
Joined: Tue Jun 15, 2004 8:43 am

bind pubm and '#' charactor issue

Post by DayCuts »

I am using a bind with the hash (#) charactor in it, however this messed up the script, and somehow it is ignoring the part of the pubm that is before the # charactor (reversed commenting??)

Does the # charactor have some kind of special meaning in a bind pubm ?
Or does the special use of this charactor for script commenting cause it to be ignored in binds?

when i check the binds list with .binds, it correctly display the full bind such as 'pubm -|- *#* %s ?? %s* 5972 m:check'

I have tried removing the * from before the # and many other alternatives, it would be quite inefficient to have to use a * bind and run a regex on every line to check the proper syntax is being used.

The tcl documentation says nothing about a special meaning of the # in binds, and logically, if it was being treated as a comment then the bind would be triggering on the '*' part and not on the '* %s ?? %s*' (which is what it is doing)
g
greenbear
Owner
Posts: 733
Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway

Post by greenbear »

try escaping it with \ .ie \#
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Post by strikelight »

The pubm binding matches against the channel name first, and because most channels contain a #, if you are wanting to use a # as well as part of your trigger you would want your binding to take the form of:

bind pubm - "% *#* % ?? *"

Of course, it would be more helpful if you were more specific in what exactly you wish for your users to type to trigger the event.
D
DayCuts
Voice
Posts: 37
Joined: Tue Jun 15, 2004 8:43 am

Post by DayCuts »

Thank you, i changed the bind to take into account the channel name matching that comes first and eliminated the bug : )
Locked