mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Oct 2005
Posts: 122
O
Vogon poet
OP Offline
Vogon poet
O
Joined: Oct 2005
Posts: 122
hi, im trying to make myself a ban and unban script, but they wont work together..my ban script is as follows:

Code:
 on *:text:!shutup *:#: {
if ($2 ison $chan) && ($nick == nick1) && ($address iswm identd@hostname) { ban $chan $2
elseif ($2 ison $chan) && ($nick == nick2) && ($address iswm identd2@hostname2) { ban $chan $2
else { halt }  


and when its executed it bans it this way:

Bot sets mode: +b nick!*identd@hostname.com

Now my unban script is

Code:
 on @100:text:!unban *:#:{ 
if ($nick == nick1) && ($address iswm identd@hostname) { mode $chan -b $2
elseif ($nick == nick2) && ($address iswm identd2@hostname2) { mode $chan -b $2
else { halt }  


but this wont unban em. On the bots status screen this comes up:

#channel nick!*identd@hostname set by Bot (Fri Oct 07 13:28:39)

lil help?

Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
AS per your script if you were to use that !unban first you would need level 100 second it would have to something like

!unban nick!*identd@hostname.com for it to unban by using mode # -b host

heres a small script you can do real quick too (also depending on how you added your level ill just do a quick example...

Code:
on *:TEXT:*:#: {
if ($1 == !shutup) && ($2 ison #) { 
mode # +b $address($2,8)
}
if ($level($address($nick,3)) == 100) && ($1 == !unban) && ($2 ison #) {
mode # -b $address($2,8)
}
}


so you see by doing $address($2,8) soon you enter the second work "nickname" it fills in the $2 of course which values to finding out the address of the nick... but basically thats whats wrong with your script...

is just that you have your !unban script unban with $2 and like i said the only way to use your script as is is to do !unban nick!*identd@hostname.com


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
on one you have on *:
on the other you have on 100:

plus you have mismatched { } brackets

you might try these and see if they work for you
Code:
on *:text:!shutup *:#: {
  if ($2 ison $chan) && ($nick == nick1) && ($address iswm identd@hostname) { ban $chan $2 }
  if ($2 ison $chan) && ($nick == nick2) && ($address iswm identd2@hostname2) { ban $chan $2 }
}  
on *:text:!unban *:#:{ 
  if ($nick == nick1) && ($address iswm identd@hostname) { mode $chan -b $2 }
  if ($nick == nick2) && ($address iswm identd2@hostname2) { mode $chan -b $2 }
} 

I had posted this with $wildsite but in retrospect $address should be better

$wildsite
Returns the address of the user who triggered an event in the form *!*@host.

Last edited by MikeChat; 07/10/05 04:51 AM.
Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
oh yeah thats true i now see the mismatched brackets on his script laugh can save alot of headaches if after your done making a script in remotes Highlight the whole page either by right clicking the dialog and click select all

then press the {} button in top right corner will tell u if theres a mismatch if so make sure you add your brackets properly will save TONS of headaches down the line


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
Joined: Jul 2003
Posts: 655
Fjord artisan
Offline
Fjord artisan
Joined: Jul 2003
Posts: 655
Highlighting is not neccersary.


"Allen is having a small problem and needs help adjusting his attitude" - Flutterby
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
As a note, besides that your brackets aren't set up correctly, you also don't need to use halt at the end of a script. smile


Invision Support
#Invision on irc.irchighway.net

Link Copied to Clipboard