mIRC Home    About    Download    Register    News    Help

Print Thread
My ban and unban script wont work 2getha #132031 07/10/05 03:30 AM
Joined: Oct 2005
Posts: 122
O
onesikgypo Offline OP
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?

Re: My ban and unban script wont work 2getha #132032 07/10/05 04:47 AM
Joined: Aug 2005
Posts: 1,052
L
Lpfix5 Offline
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* }
Re: My ban and unban script wont work 2getha #132033 07/10/05 04:47 AM
Joined: Dec 2002
Posts: 1,245
M
MikeChat Offline
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.
Re: My ban and unban script wont work 2getha #132034 07/10/05 04:48 AM
Joined: Aug 2005
Posts: 1,052
L
Lpfix5 Offline
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* }
Re: My ban and unban script wont work 2getha #132035 07/10/05 06:06 AM
Joined: Jul 2003
Posts: 655
Om3n Offline
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
Re: My ban and unban script wont work 2getha #132036 07/10/05 01:40 PM
Joined: Oct 2004
Posts: 8,327
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,327
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