A /Me script

Which hub software is the best? Where can I find script XXX? Discuss it here...(no, this is not for advertising your hub...)

Moderator: Moderators

Locked
Paul_Don
Posts: 146
Joined: 2003-01-29 06:41
Location: uk
Contact:

A /Me script

Post by Paul_Don » 2003-02-18 12:00

a friend was telling me that theres a lua script for the protax hub which removes < > form ya name in pm and in main chat anyone know if theres a vb version of this script or can write one :P

Phantom
Posts: 72
Joined: 2003-01-11 20:13
Location: New Zealand

/me

Post by Phantom » 2003-02-18 15:21

To my understanding, if you had such a script, it would look messy as (to my knowledge) there is no way of stopping a chat message from going through. You would end up with lines looking like

<Phantom> !me blah blah
*Phantom blah blah

Also you wouldn't be able to type /me as all / commands are caught by the client, and if they don't match one of its commands then it doesn't get sent to the hub. You could use oDC as this has built in /me support, or you could easily write it into dc++ code (as I have done) but beware that there is a bug with oDC's code. If you use oDC's /me code, and type !help in ptokax hub software, it will crash. This is due to the last line sent from the help function, which looks like "<Help>" and since there is no characters on the end after the '>' it crashes. This is easily fixed by adding a line such as: if (aLine.length() > i + 1) { before it does the rest of the /me substituting

Gadget
Posts: 62
Joined: 2003-01-11 06:24
Location: Finland
Contact:

Post by Gadget » 2003-02-18 15:46

There is some kind of me support in ChatSecurity, it needs a slightly modified hub software.

Paul_Don
Posts: 146
Joined: 2003-01-29 06:41
Location: uk
Contact:

Post by Paul_Don » 2003-02-18 17:25

biggup gadget

Da8add1e
Posts: 30
Joined: 2003-02-04 13:17
Location: Saddams Bunker :)

Post by Da8add1e » 2003-02-18 18:47

see my IRC-Emulator script it has /me and lots of other IRC type commands :D

Paul_Don
Posts: 146
Joined: 2003-01-29 06:41
Location: uk
Contact:

Post by Paul_Don » 2003-02-18 20:12

couldve gimme a link for it lol or do i have to work?

Da8add1e
Posts: 30
Joined: 2003-02-04 13:17
Location: Saddams Bunker :)

Post by Da8add1e » 2003-02-18 20:27

:?: its the message right underneath or above this one
nm heres the link anyway http://www.da8add1e.pwp.blueyonder.co.uk/ hope it helps you could disable everything bar the #me and #describe commands if thats all your after, pm me if your not sure how to do that and i'll do a version for you

Da8add1e
Posts: 30
Joined: 2003-02-04 13:17
Location: Saddams Bunker :)

Post by Da8add1e » 2003-03-07 13:29

I have made a Lite version of the IRC Emulator that does only /me and /away as for the issue of commands also appearing in chat, it also accepts commands in a PM to the bot, if you send a pm for example ..
<Da8add1e> #me jumps up and down and shouts hoorah!
all that appears in main chat is ..
* Da8add1e jumps up and down and shouts hoorah!

this also works with #away and is generally much neater than typing commands in main chat.

i'm considering doing a revised version that pops up a PM window saying 'Please leave this window open for typing commands' on connect

da8add1e.pwp.blueyonder.co.uk
Need NOT Greed (don't abuse poor countries)
Pay the Poor (increase minimum wage)
Tax the Rich (100% SuperTax rate)
(Do ya think thats maybe a little left-wing?)

TasMan
Posts: 196
Joined: 2003-01-03 08:31
Location: Canada
Contact:

Post by TasMan » 2003-03-07 14:50

Use Gadget's hub mod to disable the main chat and then you can use this script

Code: Select all

Sub DataArival(curUser, sCurData)
  If Left(sCurData, 1) = "<" Then
    Dim sTmp

    sTmp = Mid(sCurData, InStr(1, sCurData, "> ") + 2)
    
    If Left(sTmp, 3) = "/me" Then
      colUsers.SendToAll "* " & curUser.sName & " " & CStr(sTmp) & "|"
    Else
      colUser.SendToAll CStr(sCurData) & "|"
    End If
  End If
End Sub
Mind you, I'm not sure if the clients will display something that begins with a *....some may not.

TasMan
Posts: 196
Joined: 2003-01-03 08:31
Location: Canada
Contact:

Post by TasMan » 2003-03-07 14:51

Oops..that should be this

Code: Select all

Sub DataArival(curUser, sCurData) 
  If Left(sCurData, 1) = "<" Then 
    Dim sTmp 

    sTmp = Mid(sCurData, InStr(1, sCurData, "> ") + 2) 
    
    If Left(sTmp, 3) = "/me" Then 
      colUsers.SendToAll "* " & curUser.sName & " " & CStr(Mid(sTmp, 5)) & "|" 
    Else 
      colUser.SendToAll CStr(sCurData) & "|" 
    End If 
  End If 
End Sub 

Locked