Simple Greets for certain channels -- When you Join, Quit, and Part

By iProTopia on Jun 21, 2011

Simple Greets -- When you Join, Quit, and Part

You can change the "Hey everyone, how is everyone doing today" to whatever fits your needs.
Same with "Bye people i'm out"
Or "The part is a lie"
Change the "channel name is here" to your channel you want it to be.
And this is for certain channels so it doesn't greet every channel you join.

on !*:join:#:{
  if ($chan == #channel name is here)
  .msg $chan Hey everyone, how is everyone doing today? 
}

on !*:quit:#:{ 
  if ($chan == #channel name is here)
  .msg $chan Bye people i'm out 
}

on !*:part:#:{
  if ($chan == #channel name is here)
  .msg $chan The part is a lie!
}

Comments

Sign in to comment.
iProTopia   -  Jun 22, 2011

Well thanks for the help, and posting stuff that would help me, and napa I went to the server and let's see how they help me out ;)

 Respond  
Jethro   -  Jun 21, 2011

Very well, napa. I'm just gonna plug it into my take on it:

on *:quit: greet
on !*:part:#: greet
on !*:join:#: greet
alias -l greet {
  if (!$($+(%,f,$wildsite),2)) { 
    inc -u5 $+(%,f,$wildsite)
    var %p = msg # The part is a lie!
    var %t = $!istok(%c,$iif($event == quit,$comchan($nick,%q),#),124) 
    var %c = #chan1|#chan2|#chan3|#chan4|#chan5|#chan6|#chan7|#chan8
    var %j = msg # Hey $nick $+ , how are you doing today?
    goto $event | :part | if ([ [ %t ] ]) %p | halt | :join | if ([ [ %t ] ]) %j | halt |
    :quit | var %q = $comchan($nick,0) | while (%q) { | if ([ [ %t ] ]) { 
        var %qm = msg $comchan($nick,%q)
        if ($nick == $me) { %qm Bye people i'm out } 
        else { %qm Bye $nick and take care! }
      } 
      dec %q 
    }
  }
}
 Respond  
Jethro   -  Jun 21, 2011

He's going to try harder to no avail, because that quit event won't respond. If you look at the help file for the quit event, Khaled didn't make two versions of it, did he? I doubt there is an evil twin. lol

 Respond  
napa182   -  Jun 21, 2011

like i said it was an example only an you can do the flood control by using $wildsite in the alias call an then doing the check

if (!$($+(%,f,$2),2) && $1 = #Chan_Name_here) { inc -u5 $+(%,f,$2)
 Respond  
blackvenomm666   -  Jun 21, 2011

i said he's trying not. didnt say he would succeed

 Respond  
Jethro   -  Jun 21, 2011

venom, I don't see how that will send a message to the designated channel when he quits himself. When dealing with quit, you either need to use the actual #channel name or loop through the $comchan() if you have more than one channel.

 Respond  
Jethro   -  Jun 21, 2011

napa, by putting a flood control there will likely prevent either the join or part greeting from being emitted if a user joins and the other parts at the same time...

 Respond  
blackvenomm666   -  Jun 21, 2011

he's trying to make it msg when he quits

 Respond  
Jethro   -  Jun 21, 2011

Why do you use "bye I'm out" for the quit event? You're not looking for your own departure but other people's lol

And there is no $chan for the quit event. I have seen many people like you put a "#" for the quit event. That is plain wrong! To make matters worse, your quit event is functionless.

 Respond  
napa182   -  Jun 21, 2011

iProTopia, if you want help with coding in msl you can come to /server -m irc.ezzychat.com an join #MSL_4_Beginners there are people there that can help you. that is only if you want.

 Respond  
napa182   -  Jun 21, 2011

only ones you dont want to trigger ur self but not on text events as you can not trigger them ur self

here is a small example of using the $event
this is only an example:

on !*:join:#:gr #
on !*:part:#:gr #
alias -l gr {
  if (!%f && $1 = #chan_name_here) { inc -u5 %f
    msg # $iif($event = join,Hey everyone $+ $chr(44) how is everyone doing today?,The part is a lie!)
  }
}
 Respond  
iProTopia   -  Jun 21, 2011

napa182 do I do that for all events?
i'm still a n00b

 Respond  
blackvenomm666   -  Jun 21, 2011

umm napa i think he wants it so that it goes off when he joins

 Respond  
napa182   -  Jun 21, 2011

naw what i mean by # is

on *:join:#:{

also iProTopia you may want to make the events so it dont trigger on what ever client you have running the code by doing

on !*:join:#:{

unless that is what you are going for?

 Respond  
iProTopia   -  Jun 21, 2011

Ummm let me remake the script.. Or just take it down

 Respond  
blackvenomm666   -  Jun 21, 2011

mebbe he thinks if you use # it makes it room specific

 Respond  
napa182   -  Jun 21, 2011

also why the wildcard for the join an part events? when # will work just fine
you should really think about flood control when making these or you will end up flooding off the network if you get a clone flood or someone joining an parting over an over

 Respond  
blackvenomm666   -  Jun 21, 2011

thats what i was trying to point out haha but forgot bout checking the format on his on quit ty for catching that nap

 Respond  
napa182   -  Jun 21, 2011

the quit event is the wrong format. should be

on *:quit:{

quit does not have any chan set for it

it almost looks like you are pulling these from some tut an posting them here. i am not saying you are but like i said before why dont you think of something worth posting here

 Respond  
iProTopia   -  Jun 21, 2011

I was about to write that but I didn't

 Respond  
blackvenomm666   -  Jun 21, 2011

for the quit message it messages every channel your in so why not just use mirc's built in quit message system found in the options area? alt +o left side irc>messages>quit message

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.