mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jul 2017
Posts: 2
D
Deckard Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
D
Joined: Jul 2017
Posts: 2
when someone invites to channel its show this on my satus
* /ban: insufficient parameters plz help me i spent hours to fix i cant figure it out
on 1:text:*:#: {
if (( $me isop $chan ) && ( $nick == %shutyouup )) { goto start }
if (( $me isop $chan ) && ( $wildsite == %shutupip )) { goto star1 }
else goto end
:start
if ( %shutuptriple == $nick ) { .ban -u300 $chan %shutuptriple | .kick $chan $nick  $nick  %oz.oz.shutup4 | unset %shutuponce | unset %shutuptwice | unset %shutuptriple | goto end }
if ( %shutuptwice == $nick ) { .set %shutuptriple $nick | .kick $chan $nick  $nick  %oz.oz.shutup3 | goto end }
if ( %shutuponce == $nick ) { .set %shutuptwice $nick | .kick $chan $nick  $nick  %oz.oz.shutup2 | goto end }
if ( %shutyouup == $nick ) { .set %shutuponce $nick | .kick $chan $nick  $nick  %oz.oz.shutup1 | goto end }
else goto end
:star1
if ( %shutupip3 == $wildsite ) { .ban -u300 $chan $wildsite | .kick $chan $nick  $nick  %oz.oz.shutup4 | unset %shutupaddyonce | unset %shutupaddytwice | unset %shutupip3 | goto end }
if ( %shutupip2 == $wildsite ) { .set %shutupip3 $wildsite | .kick $chan $nick  $nick  %oz.oz.shutup3 | goto end }
if ( %shutupip1 == $wildsite ) { .set %shutupip2 $wildsite | .kick $chan $nick  $nick  %oz.oz.shutup2 | goto end }
if ( %shutupip == $wildsite ) { .set %shutupip1 $wildsite | .kick $chan $nick  $nick  %oz.oz.shutup1 | goto end }
:end
}
on 1:action:*:#: {
if (( $me isop $chan ) && ( $nick == %shutyouup )) { goto start }
if (( $me isop $chan ) && ( $wildsite == %shutupip )) { goto star1 }
else goto end
:start
if ( %shutuptriple == $nick ) { .ban -u300 $chan %shutuptriple | .kick $chan $nick  $nick  %oz.oz.shutup4 | unset %shutuponce | unset %shutuptwice | unset %shutuptriple | goto end }
if ( %shutuptwice == $nick ) { .set %shutuptriple $nick | .kick $chan $nick  $nick  %oz.oz.shutup3 | goto end }
if ( %shutuponce == $nick ) { .set %shutuptwice $nick | .kick $chan $nick  $nick  %oz.oz.shutup2 | goto end }
if ( %shutyouup == $nick ) { .set %shutuponce $nick | .kick $chan $nick  $nick  %oz.oz.shutup1 | goto end }
else goto end
:star1
if ( %shutupip3 == $wildsite ) { .ban -u300 $chan $wildsite | .kick $chan $nick  $nick  %oz.oz.shutup4 | unset %shutupaddyonce | unset %shutupaddytwice | unset %shutupip3 | goto end }
if ( %shutupip2 == $wildsite ) { .set %shutupip3 $wildsite | .kick $chan $nick  $nick  %oz.oz.shutup3 | goto end }
if ( %shutupip1 == $wildsite ) { .set %shutupip2 $wildsite | .kick $chan $nick  $nick  %oz.oz.shutup2 | goto end }
if ( %shutupip == $wildsite ) { .set %shutupip1 $wildsite | .kick $chan $nick  $nick  %oz.oz.shutup1 | goto end }
:end
}
on 1:notice:*:#: {
if ( $nick == ChanServ ) { goto end }
if (( $me isop $chan ) && ( $nick == %shutyouup )) { goto start }
if (( $me isop $chan ) && ( $wildsite == %shutupip )) { goto star1 }
else goto end
:start
if ( %shutuptriple == $nick ) { .ban -u300 $chan %shutuptriple | .kick $chan $nick  $nick  %oz.oz.shutup4 | unset %shutuponce | unset %shutuptwice | unset %shutuptriple | goto end }
if ( %shutuptwice == $nick ) { .set %shutuptriple $nick | .kick $chan $nick  $nick  %oz.oz.shutup3 | goto end }
if ( %shutuponce == $nick ) { .set %shutuptwice $nick | .kick $chan $nick  $nick  %oz.oz.shutup2 | goto end }
if ( %shutyouup == $nick ) { .set %shutuponce $nick | .kick $chan $nick  $nick  %oz.oz.shutup1 | goto end }
else goto end
:star1
if ( %shutupip3 == $wildsite ) { .ban -u300 $chan $wildsite | .kick $chan $nick  $nick  %oz.oz.shutup4 | unset %shutupaddyonce | unset %shutupaddytwice | unset %shutupip3 | goto end }
if ( %shutupip2 == $wildsite ) { .set %shutupip3 $wildsite | .kick $chan $nick  $nick  %oz.oz.shutup3 | goto end }
if ( %shutupip1 == $wildsite ) { .set %shutupip2 $wildsite | .kick $chan $nick  $nick  %oz.oz.shutup2 | goto end }
if ( %shutupip == $wildsite ) { .set %shutupip1 $wildsite | .kick $chan $nick  $nick  %oz.oz.shutup1 | goto end }
:end
}
alias ozozozozlite if $dialog(ozozozozlite) == $null { dialog -ma ozozozozlite ozozozozlite }


dialog ozozozozlite {
title "Oz Shut Up Edit"
size -1 -1 198 84
option dbu
edit "",1, 42 5 150 12,autohs
edit "",2, 42 20 150 12,autohs
edit "",3, 42 35 150 12,autohs
edit "",4, 42 50 150 12,autohs
text "1st Warning",5, 5 6 38 9
text "2nd Warning",6, 5 21 38 9
text "3rd Warning",7, 5 36 38 9
text "kick/ban Msg",8, 5 51 38 9
button "Defaults",909, 5 68 40 10
button "close",908, 151 68 40 10,ok,
}
on *:dialog:ozozozozlite:edit:*: {
set %oz.oz.shutup1 $did(1)
set %oz.oz.shutup2 $did(2)
set %oz.oz.shutup3 $did(3)
set %oz.oz.shutup4 $did(4)
}

on *:dialog:ozozozozlite:init:*:{
if (%oz.oz.shutup1 != $null) { did -a ozozozozlite 1 %oz.oz.shutup1 }
if (%oz.oz.shutup2 != $null) { did -a ozozozozlite 2 %oz.oz.shutup2 }
if (%oz.oz.shutup3 != $null) { did -a ozozozozlite 3 %oz.oz.shutup3 }
if (%oz.oz.shutup4 != $null) { did -a ozozozozlite 4 %oz.oz.shutup4 }
}
on 1:dialog:ozozozozlite:sclick:*: {
if $did == 909 {
unset %oz.oz.shutup1 | set %oz.oz.shutup1 Shut Up!! 1st Warning!! | did -ra ozozozozlite 1 %oz.oz.shutup1
unset %oz.oz.shutup2 | set %oz.oz.shutup2 Shut Up!! 2nd Warning!! | did -ra ozozozozlite 2 %oz.oz.shutup2
unset %oz.oz.shutup3 | set %oz.oz.shutup3 Shut Up!! Third and Final Warning!! | did -ra ozozozozlite 3 %oz.oz.shutup3
unset %oz.oz.shutup4 | set %oz.oz.shutup4 Shut Up!! Three strikes and you're out!! | did -ra ozozozozlite 4 %oz.oz.shutup4
}
}

Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
When all else fails, insert some debug lines into your script so you can see what it's doing. In between these 2 lines

Quote:
on 1:notice:*:#: {
if ( $nick == ChanServ ) { goto end }


insert this line

Code:
echo -s $nopath($script) $scriptline target $target chan $chan nick $nick address $address wildsite $wildsite shutupip %shutupip line (1) $1 (2) $2 (3) $3 (4-) $4-



You'll see that, in the /notice generated by the invite, $nick is not filled by the nick being invited, but $nick and $address are both filled by the name of the server that the invited nick is on, and $wildsite is blank. I suspect your script is not filling %shutupip elsewhere, so when your script checks if (%shutipip == $wildsite), they're both $null, so they match, but this $null value in the ban command because the missing/insufficient parameter.

If you want to identify the difference between this notice and a notice faked by someone, you can use the results of that /notice to identify things that won't be that way with other notices:

1. $address == $nick instead of being an actual nick.
2. $wildsite is $null
3. $target == @ $+ $chan
4. $2 $4- == invited into the channel.

Unless you have a list of server names or they are all guaranteed to be a certain pattern such as containing the $network name, you can't verify that $nick is really the servername on which the invited nick resides.

Instead of banning $nick you should ban $3, and if the banned nick isn't in the channel you'll get an error message from the server telling you so, so instead of banning $wildsite you should ban $3 $+ !*@*
Your kick command should first check of the nick is even on channel yet before trying to kick them. Also, you have the script try to ban someone as many as FOUR times, depending on how many of those variables are set. Instead of..

if ( %shutupip3 == $wildsite ) do stuff
if ( %shutupip2 == $wildsite ) do stuff

do..

if ( %shutupip3 == $3 ) do stuff
elseif ( %shutupip2 == $3 ) do stuff

and since you need to make sure someone is in channel before kicking them..

.kick $chan $nick  $nick  %oz.oz.shutup1

becomes

if ($3 ison $chan) kick $chan $3  $3  %oz.oz.shutup1


Link Copied to Clipboard