on text LEAVE - 14/01/14 02:37 AM
Hi, I'll just let you know that I am not the best coder around, I pretty much only know the primitive methods of coding. This is why I need your assistance!
The script I made forces a user to have the bot in their channel, cause when you make her join your channel, the user gets put in a variable called %channels. And, that you are an op in the channel whom you want her to leave. However, if I have her in my channel, I can make her leave in any channel which I am an op in.
Is there a better way to solve this? So that only the very person who added her to their channel can make her leave?
This is how I wrote it:
The script I made forces a user to have the bot in their channel, cause when you make her join your channel, the user gets put in a variable called %channels. And, that you are an op in the channel whom you want her to leave. However, if I have her in my channel, I can make her leave in any channel which I am an op in.
Is there a better way to solve this? So that only the very person who added her to their channel can make her leave?
This is how I wrote it:
Code:
on *:text:!leave:#: { if ($istok(%channels,$nick,32)) && ($nick isop #) { msg $chan Sayounara! /leave # set %channels $remtok(%channels,$nick,1,32) echo left $chan which was initiated by $nick } else { msg $chan You do not have the required authorization to do this, $nick $+ . } } on *:text:!join:#nillens: { if ($istok(%channels,$nick,32)) { msg $chan I am already in your channel, $nick $+ . } elseif (!$istok(%channels,$nick,32)) { /j $nick echo joined $nick set %channels $addtok(%channels,$nick,32) } }