on join

By Lenooox on Dec 18, 2011

simple join , part , quit message with .txt

on *:JOIN:#:{
msg $chan $read(wc.txt) }

raw 821:*:{ msg $chan $read(wcback.txt) }

on *:part:#: {
msg  $nick $read(part.txt) }

on *:QUIT:#: {
msg $chan($nick,1) $read(quit.txt) }

Comments

Sign in to comment.
Jethro   -  Dec 18, 2011

I've just realized that you edited your code. Here is another one below to reflect the change:

on !*:join:#:{
  msg # $read(wc.txt)
}
on !*:part:#:{
  msg # $read(part.txt)
}
raw 821:*:{
  msg $1 $read(wcback.txt)
}
on !*:quit:{
  var %q = 1, %m
  while ($comchan($nick,%q)) {
    msg $v1 $read(quit.txt)
    inc %q
  }
}

The ! prefixed in front of those events will tell mIRC not to send the message to channel when the client that runs the code parts, joins, or quits. (yourself)

The ! tells mIRC to send message when other people do so only.

More
 Respond  
Lenooox   -  Dec 18, 2011

ahh i understand :) thank you Jethro

More
 Respond  
Jethro   -  Dec 18, 2011

I forgot to mention that there is also no $chan for raw 821. You should use $1 to represent $chan. Below is the working edit:

on me:*:join:#:{
  msg # $read(wc.txt)
}
on me:*:part:#:{
  msg # $read(part.txt)
}
raw 821:*:{
  msg $1 $read(wcback.txt)
}
on *:quit:{
  var %q = 1, %m
  while ($comchan($nick,%q)) {
    %m = $v1
    if ($nick == $me) {
      msg %m $read(quit.txt)
    }
    inc %q
  }
}

raw 821 is available for most IRCX or hybrid chat servers that I've come across. For IRCD, you may need to whois and check people's away status using raw 301. To check your own away and back status, use raw 305 and 306.

More
 Respond  
Lenooox   -  Dec 18, 2011

ohh thank you :s I did not knew that is not available for RAW 821 can not be replaced raw 821 with something?

More
 Respond  
Jethro   -  Dec 18, 2011

The critical part of your snippet is the quit event. The way you have it currently will not work. There's no $chan for it. You need to loop through the common channels using $comchan()

In addition, raw 821 is not commonly support by many IRCD servers but IRCX.

More
 Respond  
Wader   -  Dec 18, 2011

Not quite sure why you would want to message yourself when you part a channel.

More
 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.