mIRC Home    About    Download    Register    News    Help

Topic Options
#132031 - 07/10/05 04:30 AM My ban and unban script wont work 2getha
onesikgypo Offline
Vogon poet

Registered: 07/10/05
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?

Top
#132032 - 07/10/05 05:47 AM Re: My ban and unban script wont work 2getha
Lpfix5 Offline
Hoopy frood

Registered: 10/08/05
Posts: 1052
Loc: Canada
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* }

Top
#132033 - 07/10/05 05:47 AM Re: My ban and unban script wont work 2getha
MikeChat Offline
Hoopy frood

Registered: 12/12/02
Posts: 1245
Loc: California, doooood
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.


Edited by MikeChat (07/10/05 05:51 AM)

Top
#132034 - 07/10/05 05:48 AM Re: My ban and unban script wont work 2getha
Lpfix5 Offline
Hoopy frood

Registered: 10/08/05
Posts: 1052
Loc: Canada
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* }

Top
#132035 - 07/10/05 07:06 AM Re: My ban and unban script wont work 2getha
Om3n Offline
Fjord artisan

Registered: 06/07/03
Posts: 655
Highlighting is not neccersary.
_________________________
"Allen is having a small problem and needs help adjusting his attitude" - Flutterby

Top
#132036 - 07/10/05 02:40 PM Re: My ban and unban script wont work 2getha
Riamus2 Offline
Planetary brain

Registered: 13/10/04
Posts: 8327
Loc: MA, USA
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

Top