Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ Bug reports ➜ : converts wrong to regexp and window glitch

: converts wrong to regexp and window glitch

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Shadowfyr   USA  (1,792 posts)  Bio
Date Fri 08 Nov 2002 02:28 AM (UTC)
Message
First off.. : is incorrectly converted in aliases (and probably triggers) when you use 'convert to regular expression'. While it has special meaning with relation to specific words such as :alphanum:, it does not have a special meaning by itself. The result is that \: will never match, but this is what the client converts it to.

Second.. This has been around for a long time. I normally only have one world open and maximized. If you open a second world, then later close the client, the next time I start the client my previously 'maximized' window has been compressed down to as small as it will go and when I re-maximize it, the input window is also at the minimum of one line.

This is quite annoying, since I can't add my test world to the autoloader and have everything end up back where I put it the last time. It seems like having more than one world open is causing the world window settings to not be saved when the window(s) in question have been maximized to fit the client's main window. I am not sure if it is also doing this with worlds that are intentionally left non-maxed, but since a lot of people intentionally leave room for notpad windows, etc., I have to assume that it is only maximized ones being effected.
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #1 on Fri 08 Nov 2002 03:11 AM (UTC)
Message
Quote:

The result is that \: will never match, but this is what the client converts it to.


Seems to match when I try it. Can you give me an example regexp where it doesn't?

eg.

^eat\:me$

This matches when I type "eat:me" on the command line.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #2 on Fri 08 Nov 2002 03:12 AM (UTC)
Message
I am planning to move the window positions to the world file. This should fix up some of these glitches.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Shadowfyr   USA  (1,792 posts)  Bio
Date Reply #3 on Fri 08 Nov 2002 07:22 PM (UTC)
Message
This one failed as a regexp alias>

^(bs|gossip) (\:|\;)?(.*)

Making it:

^(bs|gossip) (:|\;)?(.*)

fixed the problem..

When it called the script the supposedly 'correct' version would match on>

bs Hello --> wildcards = "bs", "", "Hello"
bs ;lol --> wildcards = "bs", ";", "lol"

but failed to return the : when given a line like>

bs :blinks rapidly. -> wildcards = "bs", "", ":blinks rapidly."

Looking over the regexp docs I see that : is used someplace where it needs to be \:, but it doesn't seem to want to work correctly in the case above. :p
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #4 on Fri 08 Nov 2002 09:53 PM (UTC)
Message
This doesn't seem to be my day for reproducing reported problems. :)

I used this alias:


<aliases>
  <alias
   match="^(bs|gossip) (\:|\;)?(.*)"
   enabled="y"
   regexp="y"
  >
  <send>think 1 = %1
think 2 = %2
think 3 = %3</send>
  </alias>
</aliases>


I typed:


bs :blinks rapidly.


I got:


think 1 = bs
think 2 = :
think 3 = blinks rapidly.
1 = bs
2 = :
3 = blinks rapidly.


So, it seems to work for me. :)

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Shadowfyr   USA  (1,792 posts)  Bio
Date Reply #5 on Sat 09 Nov 2002 02:55 AM (UTC)

Amended on Sat 09 Nov 2002 02:56 AM (UTC) by Shadowfyr

Message
Very strange.. Maybe it is something in the script call. The script I used was>

sub Surname(name, output, wilds)
  dim MyName
  Myname = "Testing"
  select case wilds(2)
    case ":",";"
      world.send wilds(1) & " " & wilds(2) & wilds(3)
    case else
      world.send wilds(1) & " " & ":" & MyName & ": " & wilds(3)
  end select
end sub


A world.note wilds(2) returned a blank line with the alias. :p It may be returning the right thing in the alias itself, but it executed the 'case else' section when it called the script. This is in version 3.30 BTW. I haven't gotten the new version yet.

I have since modified the script to split case up more, so ; and : are handled differently, but it should 'I assume" not work at all with '^(bs|gossip) (:|\;)?(.*)' do to the lack of \:, but instead I had to use that form to have it work right. This makes no sense.. :p
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #6 on Sat 09 Nov 2002 03:07 AM (UTC)
Message
No it doesn't make sense. I really need a reproducable case before I can do much with it.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Shadowfyr   USA  (1,792 posts)  Bio
Date Reply #7 on Sat 09 Nov 2002 03:22 AM (UTC)
Message
Grr... I must have originally mispelled something.. :p It works both ways now when trying a simple call and some notes. Sigh... Never mind I guess. lol
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


18,266 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.