Top

Common Channels


mIRC Code
+ 0 likes
Please Register to submit score.
Bookmark and Share
Average Score  4.0 (of 2 scores)
Date Added  Apr 16, 2007
Last Updated  Apr 16, 2007
Tags  channels  common  xstatic 

Introduction

Just a simple common channel thingy, it gets all the channel that you and the person that has just joint, and it says it in the channel on which they joined

Grab the Code

on *:JOIN:#: {
  if ($nick == $me) { halt }
  else {
    unset %lol
    var %total = $comchan($nick,0), %x = 1
    while ( %x <= %total ) {
      set %lol %lol $+ , $+ $comchan($nick,%x)
      inc %x
    }
    msg # $nick is in the following channels that i am in: $replace(%lol,$chr(44),$chr(32))
  }
}
 

Comments

  (3)  RSS
xDaeMoN
Comments: 695
 
mIRC Snippet:  Common Channels
Posted on Apr 16, 2007 2:29 am
Declare %lol as a local var so no need to unset them, so include "%lol" in the "var ...." line

Change this line
Code:
set %lol %lol $+ , $+ $comchan($nick,%x)

to
Code:
%lol = %lol $comchan($nick,%x)


so there is no need to use $replace as the channels are already being added in the variable separated by a space.

Use "!" in your ON Join event which means "except you"
Code:
on !*:JOIN:#: {


:)
xDaeMoN
Comments: 695
 
mIRC Snippet:  Common Channels
Posted on Apr 16, 2007 2:30 am
The last part of my post will remove line below

Code:
 if ($nick == $me) { halt }
DarthReven
Comments: 468
 
mIRC Snippet:  Common Channels
Posted on Apr 16, 2007 3:23 am
Try using $addtok to add your tokens with the ASCII Character you want between the respective tokens. EX:
Code:

on !*:join:#: {
  if ($comchan($nick,0) > 1) {
    var %output, %start 1
    while ($comchan($nick,1)) { %output = $addtok(%output,$v1,32) | inc %start }
    msg $chan %output
  }
}

Commenting Options

Register or Login to Hawkee.com or use your Facebook or Twitter account by clicking the corresponding button below.

  
Bottom