mIRC Home    About    Download    Register    News    Help

Print Thread
Page 1 of 2 1 2
#129466 06/09/05 06:42 PM
Joined: Sep 2005
Posts: 21
S
SalCro Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Sep 2005
Posts: 21
Hello,

i recently made a Bot
Yesterday i added something when i type !botoff the bot deops himself bot it reacts to my nickname

Code:
on *:text:!botoff*:#gameaddict: {
if ($me isop #) && ($nick == SalCro^) && ($nick isop #) {
/mode $chan -o $me
else ($nick != SalCro^) { HALT }
}
}


Can't i replace nick into something like this SalCro@salcro.users.quakenet.org

else if someone changes his nick to SalCro^he can operate my bot


grtz
thx in advence Kev.

#129467 06/09/05 06:50 PM
Joined: Sep 2005
Posts: 116
I
Vogon poet
Offline
Vogon poet
I
Joined: Sep 2005
Posts: 116
u can $address identifir hold the adress on the user who started that textmessage

so do a if ($adress == youradress) [

to get your adress do a echo no your own adress or something laugh

#129468 06/09/05 06:51 PM
Joined: Sep 2005
Posts: 21
S
SalCro Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Sep 2005
Posts: 21
So how do i have to type my adress

*!*nickname@*.users.quakenet.org like this or ????

plz help thx

#129469 06/09/05 06:57 PM
Joined: Sep 2005
Posts: 116
I
Vogon poet
Offline
Vogon poet
I
Joined: Sep 2005
Posts: 116
yes

if ($adress === *!*nickname@*.users.quakenet.org)
or
if ($adress isin *!*nickname@*.users.quakenet.org)

but i didnt test it whit wildcats yet i think that only works whit the isin funtion

Last edited by Im2good4u; 06/09/05 06:59 PM.
#129470 06/09/05 07:07 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
It's $address, not $adress.

Code:
on *:text:!botoff:#gameaddict: { 
  if ($me isop $chan) && ($address($nick,5) == SalCro^!SalCro@salcro.users.quakenet.org) && ($nick isop $chan) {
    mode $chan -o $me 
  }
}


This will do what you want and only work when you're logged in on quakenet and if you keep your nick/ident the same as you mentioned. If you want it to work with any nick or with any ident or something else, just ask.

Note that you don't need to halt something if you there's nothing left to do in the script. If the IF statement fails, there's nothing to do, so it's already halted.

Also, please put any scripts into [[b][/b]code] tags so that we can see it more easily. smile

EDIT: Btw, I removed the * at the end of your !botoff trigger because * is only going to be needed if you want the trigger to work with additional information. From what code you have here, it looks as though you're only using !botoff and nothing else (not something like !botoff 10 to turn it off in 10 seconds or minutes).

Just as another comment... You may want to consider changing this into a command that works only in query or chat rather than in channel. Bot commands that are available only to ops should usually not be seen by everyone. If people don't know you have a command to do something, they can't attempt to bypass it.

Our bot is controlled only via DCC Chat (logged in with passwords) and via our keyed op channel. No user can see when we use commands that are for ops only.

Anyhow, you may not care about that. I just thought I'd mention it for you.

Last edited by Riamus2; 06/09/05 07:21 PM.

Invision Support
#Invision on irc.irchighway.net
#129471 06/09/05 07:11 PM
Joined: Sep 2005
Posts: 116
I
Vogon poet
Offline
Vogon poet
I
Joined: Sep 2005
Posts: 116
yeh yeh i got so a lot of scripting XP im just new to this forum

#129472 06/09/05 07:15 PM
Joined: Sep 2005
Posts: 21
S
SalCro Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Sep 2005
Posts: 21
ok, thx

one more question what does $nick,5 mean ?

#129473 06/09/05 07:24 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
$address($nick,5) will display the FULL $address. Actually, you could just use $fulladdress for this... I just like using $address in case I ever decide to change the type.

$address($nick,5) uses nick!ident@host

whereas $address($nick,2) would be the typical ban mask that people use -> *!*@host

Type /help $address and click the first option, then page down one page and you'll see all the $address mask types.

Btw, read the end of my previous message... I edited it but you replied before I finished.

You can check your own $address information by using it like this:

//echo -a $address($me,5)

Just replace the 5 with the different numbers.

Last edited by Riamus2; 06/09/05 07:27 PM.

Invision Support
#Invision on irc.irchighway.net
#129474 06/09/05 07:28 PM
Joined: Sep 2005
Posts: 21
S
SalCro Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Sep 2005
Posts: 21
So ehh how can i make the command work for my bot and not to be shown in public

that scripts runs on my bot

so norammly it should work when SalCro^ says !botoff

Last edited by SalCro; 06/09/05 07:32 PM.
#129475 06/09/05 07:29 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
What doesn't work with it?

If it's just ignoring you, type //echo -a $address($me,5) and make sure that matches the IF line's address that I put for you.


Invision Support
#Invision on irc.irchighway.net
#129476 06/09/05 07:32 PM
Joined: Jul 2005
Posts: 25
U
Ameglian cow
Offline
Ameglian cow
U
Joined: Jul 2005
Posts: 25
if IAL is off,$address doesn't work...

you can use $fulladdress

$fulladdress = $address(nick,5) = Nick's full adress.

#129477 06/09/05 07:35 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Yes, I mentioned $fulladdress. I didn't realize that about IAL, though that makes sense. I think that for people who use scripts, they should have it on... makes things much easier.

I am curious, however, as to why $fulladdress would work with IAL off if $address doesn't. Oh well. smile


Invision Support
#Invision on irc.irchighway.net
#129478 06/09/05 07:35 PM
Joined: Sep 2005
Posts: 21
S
SalCro Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Sep 2005
Posts: 21
so now i have

Code:
on *:text:!botoff:#gameaddict: { 

  if ($me isop $chan) && ($fulladress == SalCro^!~salcro@SalCro.users.quakenet.org) && ($nick isop $chan) {

    mode $chan -o $me 

  }

}


No reaction .... doesn't work, i'm sorry blush

#129479 06/09/05 07:40 PM
Joined: Jul 2005
Posts: 25
U
Ameglian cow
Offline
Ameglian cow
U
Joined: Jul 2005
Posts: 25
it $fulladdress, not $fulladress...

yes Riamus.that's right wink

Last edited by UOnur; 06/09/05 07:41 PM.
#129480 06/09/05 07:43 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
As mentioned, two d's in address. That may be part of the reason the original code wasn't working for you if you didn't put 2 in there either.

Also, your example you put of your current code shows ~ in your ident. Do you have your IDENTD turned on? In your original example of your address, you didn't display it, so I didn't include it in the code. If it's on (and working), you won't have the ~ in there, so you don't want it to be in the IF line.


Invision Support
#Invision on irc.irchighway.net
#129481 06/09/05 07:46 PM
Joined: Sep 2005
Posts: 21
S
SalCro Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Sep 2005
Posts: 21
Quote:
it $fulladdress, not $fulladress...



LOL omfg sorry :tongue: i'm from belgium ... sometimes i forget some english letters ^^

but isn't ($address($nick,1) == *!*salcro@SalCro.users.quakenet.org easier ?


Last edited by SalCro; 06/09/05 07:48 PM.
#129482 06/09/05 07:50 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
You can use $address($nick,1) if you choose. Using 5 (or $fulladdress) allows for greater security. Of course, since you're logging into quakenet, you're probably pretty secure regardless. It's up to you, which one you choose. Find a mask you like and use it. laugh


Invision Support
#Invision on irc.irchighway.net
#129483 06/09/05 07:54 PM
Joined: Sep 2005
Posts: 21
S
SalCro Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Sep 2005
Posts: 21
ok, thx for the help dude laugh

now my last question ...
I want to !botoff without all the rest seeing it ... what should i do ?

#129484 06/09/05 08:09 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
As I mentioned above, you can use it in query or in DCC Chat rather than the channel.

For Query (private message entry):

Change to:
Code:
on *:text:!botoff:?: {
  if ($me isop #gameaddict) && ($fulladdress == SalCro^!~salcro@SalCro.users.quakenet.org) && ($nick isop #gameaddict) {
    mode #gameaddict -o $me
  }
}


For DCC Chat:
Code:
on *:chat:!botoff: {
  if ($me isop #gameaddict) && ($fulladdress == SalCro^!~salcro@SalCro.users.quakenet.org) && ($nick isop #gameaddict) {
    mode #gameaddict -o $me
  }
}


You could use either code or both codes. You could even use all 3. It's up to you.


Invision Support
#Invision on irc.irchighway.net
#129485 06/09/05 08:23 PM
Joined: Sep 2005
Posts: 21
S
SalCro Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Sep 2005
Posts: 21
i used the ?

now is i just type in the chat !botoff nothing happens do i have to type /msg !botoff ?

Page 1 of 2 1 2

Link Copied to Clipboard