mIRC Homepage
Posted By: Drai On Join Messaging - 28/11/07 08:38 PM
Ok, I'm trying to change the messaging in this channel whenever somebody joins (yes I am a SOP and I have permission) but I'm having some troubles. As you can see "jetgolfer" has a message that appears "/me go recruit" and I was wondering how to move my "don't listen to jet" to below his statement and have it in the /me form rather than the way it appears like you can see it there. And obviously it's appearing too early on in the mix of messages there.


* Now talking in #Consilium
<Drai> don't listen to Jet
* Topic is 'Go Recruit (jetgolfer|Atlantis[DoM])'
* Set by Drai on Sun Nov 25 15:36:15
* ChanServ sets mode: +oa Drai Drai
* jetgolfer|Atlantis[DoM] go recruit


What I have so far is this:
on *:JOIN:#consilium: {

/msg $chan don't listen to Jet
}


Anyway, thanks for the help.
Posted By: Horstl Re: On Join Messaging - 28/11/07 08:48 PM
Code:
; if someone does a "/me go recruit" in the channel #consilium
on *:ACTION:go recruit:#consilium: {

  ; and jetgolfer* matches the nick of this user
  if (jetgolfer* iswm $nick) {

    ; start a timer that executes 1times after 1second 
    ; the following command: describe to the channel "don't listen..."
    .timer 1 1 describe $chan don't listen to $nick

  } 
}

You are thus responding to the "go recruit" action, not to the join itself. But as long as Jetgolfer does this action if someone enters the channel, you'll do "your" action in response to Jetgolfer's smile

'/SAY something' is related to 'MSG $chan something' is related to 'on *:TEXT:something:#:'
like
'/ME something' is related to 'DESCRIBE $chan something' is related to 'on *:ACTION:something:#:'
Posted By: Drai Re: On Join Messaging - 28/11/07 09:02 PM
But his name isn't always jetgolfer, sometimes he'll add stuff after it, so I'm wondering if I could do the same sort of idea he did where my message will just appear as "don't listen to jetgolfer" whenever somebody joins, or maybe a couple seconds after, thanks for the help though. I'll try that out.

Edit: I just tried it out, perfect! You are awesome, thanks a lot!
Posted By: Drai Re: On Join Messaging - 28/11/07 11:30 PM
How would I change the time to half a second, would I replace the two 1's with 0.5's?
Posted By: RusselB Re: On Join Messaging - 29/11/07 12:43 AM
for a half second, you would have to use the -m switch, which makes the timer into a millisecond timer, and change the 2nd 1 to 500

/help /timer
Posted By: Horstl Re: On Join Messaging - 29/11/07 12:45 AM
Nope, the "standard" format is in seconds. And the first "1" is the number of iterations/repetitions of the command.

But you can set the "delay" in milliseconds by using the -m switch. Half a second would be 500ms, therefore change the line:
.timer 1 1 describe $chan don't listen to $nick
to:
.timer -m 1 500 describe $chan don't listen to $nick

EDIT: RusselB beat me to it. smile
Posted By: Drai Re: On Join Messaging - 29/11/07 03:25 AM
Thanks!
Posted By: r34dm4n Re: On Join Messaging - 06/12/07 10:28 AM
Originally Posted By: Drai
But his name isn't always jetgolfer, sometimes he'll add stuff after it, so I'm wondering if I could do the same sort of idea he did where my message will just appear as "don't listen to jetgolfer" whenever somebody joins, or maybe a couple seconds after, thanks for the help though. I'll try that out.

Edit: I just tried it out, perfect! You are awesome, thanks a lot!


yea that part would be the :jetgolfer*:

text* = word begins with text
*text = word ends with text

so when you do jetgolfer* it dont matter if its jetgolfer1 or jetgolfer1000 wink
© mIRC Discussion Forums