Gammon Forum
Entire forum
MUSHclient
General
Blank line alias
It is now over 60 days since the last post. This thread is closed.
  Refresh page
Posted by
| JSteele1234
USA (27 posts) bio
|
Date
| Wed 18 Jun 2003 04:44 PM (UTC) |
Message
| I can't seem to find a way for an alias to stop a blank line from being sent. My only alias is *, which I would hope would match everything that's ever typed in, but it doesn't match on a blank line. ^$ looks like it would work, but it doesn't either. I don't know a whole lot about regular expressions, could there be a better one that will work? |
~ JSteele1234 ~ | top |
|
Posted by
| Magnum
Canada (580 posts) bio
|
Date
| Reply #1 on Wed 18 Jun 2003 08:11 PM (UTC) |
Message
| Try:
Click File, Global Preferences, General (tab), and check the box [ ] Regular expressions can match on an empty string |
Get my plugins here: http://www.magnumsworld.com/muds/
Constantly proving I don't know what I am doing...
Magnum. | top |
|
Posted by
| JSteele1234
USA (27 posts) bio
|
Date
| Reply #2 on Thu 19 Jun 2003 02:48 AM (UTC) Amended on Thu 19 Jun 2003 02:54 AM (UTC) by JSteele1234
|
Message
| It's not working.
Here's my alias for catching the blank line.
http://jsteele1234.shacknet.nu/EditAlias.jpg
But it's not even calling the script function. |
~ JSteele1234 ~ | top |
|
Posted by
| Nick Gammon
Australia (22,990 posts) bio
Forum Administrator |
Date
| Reply #3 on Thu 19 Jun 2003 07:10 AM (UTC) |
Message
| |
Posted by
| JSteele1234
USA (27 posts) bio
|
Date
| Reply #4 on Thu 19 Jun 2003 07:59 AM (UTC) |
Message
| Well, I made a script to use in Mushclient to function as a client for a certain chat room, which uses a unique protocol. Whenever a bad command is sent to the server it automatically bans you for 24 hours, and blank lines count as a bad command. So if I ever accidentally press enter, I'm banned for the whole day. |
~ JSteele1234 ~ | top |
|
Posted by
| Nick Gammon
Australia (22,990 posts) bio
Forum Administrator |
Date
| Reply #5 on Thu 19 Jun 2003 08:30 AM (UTC) |
Message
| Ah, I see. In that case, install this plugin, it will suppress blank lines. It uses the plugin callback OnPluginSend to detect and discard them ...
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE muclient>
<!-- Saved on Thursday, June 19, 2003, 6:25 PM -->
<!-- MuClient version 3.42 -->
<!-- Plugin "Suppress_Blank_Lines" generated by Plugin Wizard -->
<muclient>
<plugin
name="Suppress_Blank_Lines"
author="Nick Gammon"
id="020ea5e9855b555be70bcfe3"
language="VBscript"
purpose="Suppresses blank lines from being sent"
date_written="2003-06-19 18:24:57"
requires="3.31"
version="1.0"
>
</plugin>
<script>
Function OnPluginSend (sText)
If Trim (sText) = "" Then
OnPluginSend = vbFalse ' discard blank lines
Else
OnPluginSend = vbTrue ' process it
End If
End Function
</script>
</muclient>
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | top |
|
Posted by
| Flannel
USA (1,230 posts) bio
|
Date
| Reply #6 on Thu 19 Jun 2003 08:39 AM (UTC) Amended on Thu 19 Jun 2003 08:40 AM (UTC) by Flannel
|
Message
| Its late, so this is a bit fuzzy in my mind right now... but, possible solution would be to make a plugin, and have it automatically add a character to the line, using plugin callbacks.
[edit]
I should probably check for updates before I post... oh well. |
~Flannel
Messiah of Rose
Eternity's Trials.
Clones are people two. | top |
|
Posted by
| JSteele1234
USA (27 posts) bio
|
Date
| Reply #7 on Thu 19 Jun 2003 01:29 PM (UTC) |
Message
| Thank you very much. |
~ JSteele1234 ~ | 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.
21,177 views.
It is now over 60 days since the last post. This thread is closed.
  Refresh page
top
Quick links:
MUSHclient.
MUSHclient help.
Forum shortcuts.
Posting templates.
Lua modules.
Lua documentation.
Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.