mIRC Home    About    Download    Register    News    Help

Print Thread
Script to join channels with registration bot #201111 20/06/08 05:17 AM
Joined: Jan 2004
Posts: 1,276
L
Loki12583 Online OP
Hoopy frood
OP Online
Hoopy frood
L
Joined: Jan 2004
Posts: 1,276
To join certain channels on a server I belong to you must message Drone with your username and key. Drone will then force you to join the channel.

I would like to /join channels as normal and have the script take care of everything else. Now I can check with /names and use raw to see if Drone is in the channel but I'm not sure if this is the best way to go as raw 473 is used when joining any channel and I'm not sure how to go about differentiating between joining the channel and using the /names command with my script.

How best could I go about checking to see if Drone is on the channel I want to /join and then msging Drone?

Re: Script to join channels with registration bot [Re: Loki12583] #201113 20/06/08 06:33 AM
Joined: Jan 2004
Posts: 1,276
L
Loki12583 Online OP
Hoopy frood
OP Online
Hoopy frood
L
Joined: Jan 2004
Posts: 1,276
Alright, I got it working. I decided to use /names, raw, and global variables. Let me know if you have any suggestions. (I changed the network name obviously.) I had some trouble with my dynamic variable name so I threw in some brackets. I'm not sure if I used them properly but it works like this. So let me know.

Code:
;invite only
raw 473:*:if ($network == $network) { set %Drone $+ $2 1 | names $2 }

;names list
raw 353:*:{
  if ($network == $network) && ([ % $+ Drone [ $+ [ $3 ] ] ] == 1) {
    haltdef
    if ($istok($remove($4-,~,&,@,+),Drone,32)) echo  $+ .msg Drone enter $3
  }
}

;end of names list
raw 366:*:if ($network == $network) && ([ % $+ Drone [ $+ [ $2 ] ] ] == 1) { haltdef | unset %Drone $+ $2 }

Last edited by Loki12583; 20/06/08 06:50 AM.
Re: Script to join channels with registration bot [Re: Loki12583] #201132 20/06/08 05:48 PM
Joined: Jan 2004
Posts: 1,276
L
Loki12583 Online OP
Hoopy frood
OP Online
Hoopy frood
L
Joined: Jan 2004
Posts: 1,276
Cleaned it up a little bit.
Code:
raw 473:*:if ($network == $network) { set %Drone $+ $2 1 | names $2 }

raw 353:*:{
  if ([ [ $+(%,Drone,$3) ] ]) {
    haltdef
    if ($istok($remove($4-,~,&,@,+),Drone,32)) { .msg Drone enter $3 user key }
  }
}

raw 366:*:if ([ [ $+(%,Drone,$2) ] ]) { haltdef | unset %Drone $+ $2 }