mIRC Home    About    Download    Register    News    Help

Print Thread
Page 1 of 3 1 2 3
#160902 01/10/06 11:06 AM
Joined: Apr 2006
Posts: 464
O
Fjord artisan
OP Offline
Fjord artisan
O
Joined: Apr 2006
Posts: 464
I've been searching for a good blacklist, quite some time now. But I've been unable to find one that really meet my needs. I've searched all the normal scripting site's, but like I said, none of em are real quality in my opinion.

Below are some of the requirements I have. If someone feels like giving it a try, making it, it would be very appreciated:
- All info should be stored in hash table (instead of user-list)
- All bans should be done on hostmask (*!*@host)
- All bans should be global (all networks, all channels)
- All bans should automaticly ignore the user
- Kick-counter included in the kick-message
- Default blacklist reasons, like PM-spammer, Flooder
- Custom blacklist reason option
- on Query, right-click menu, select reason, ignore user and close query.
- on JOIN, echo in active window, that blacklisted user has joined.
- on JOIN, kick the user if I have ops.
- Scan for blacklisted users when I get ops.

I think that's most of the requirements I can now think of.
So, if someone has time for it, and thinks he can do it, please give it a shot.

And if someone is currently using a blacklist, one that's really recommendable, I would like to give it a try also.
I just haven't been able to find one that's real quality.

Thank for the help in advance!

#160903 01/10/06 07:43 PM
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
you have been scripting a while, how about you make it and ask for help in parts that dont work?

#160904 01/10/06 08:05 PM
Joined: Apr 2006
Posts: 464
O
Fjord artisan
OP Offline
Fjord artisan
O
Joined: Apr 2006
Posts: 464
yeah I did think about that, and it would be best since it would be 100% what I want. But my problem is the hash tables, it's hard to visualise how they work, and I just don't have a lot of experience with them. And since they would be the backbone on this script, it's hard to even find a place to start.

But indead, If I don't get a reply on this threat, I have to try something myself.
Just thought I'll give it a shot on here.

#160905 01/10/06 09:08 PM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
I saw your last post about half-an-hour after you posted it, and wrote this up in about the remaining half-hour. It has been tested to a degree, but I don't guarantee that it's 100%. If you find problems, let me know and I'll see what I can do.
Code:
on *:start:{
  if !$hget(Blacklist) { .hmake Blacklist 100 }
  if $exists(Blacklist.hsh) { .hload Blacklist Blacklist.hsh }
}
on *:exit:{
  .hsave -uo Blacklist Blacklist.hsh
}
on *:disconnect:{
  .hsave -uo Blacklist Blacklist.hsh
}
on !*:join:#:{
  if $hget(Blacklist,$nick) {
    echo -a Blacklisted $nick has joined $chan
    if $me isop $chan {
      .ban -k $chan $nick 2 $hget(Blacklist,$nick) Kick $chr(35) $hget(Blacklist,$+(Count,.,$nick))
    }
  }
}
on *:op:#:{
  blacklist scan $chan
}
on *:serverop:#:{
  blacklist scan $chan
}
on *:ban:#:{
  .ignore $bmask
  updatenl
}
on *:kick:#:{
  hinc Blacklist $+(Count,.,$knick))
  updatenl
}
alias blacklist {
  if $1 == add {
    var %a = 1, %b = $numtok($2-,44)
    while %a <= %b {
      .hadd -m Blacklist $gettok($2-,%a,44) $iif($3-,$3-,$$?="Blacklist Reason")
      inc %a
    }
  }
  elseif $1 == scan {
    if $me isop $2 {
      var %a = 1
      while %a <= $nick($2,0) {
        if $hget(Blacklist,$nick($2,%a)) {
          .ban -k $1 $nick($2,%a) 2 $hget(Blacklist,$nick($2,%a)) Kick $chr(35) $hget(Blacklist,$+(Count,.,$nick($2,%a)))
          dec %a
        }
        inc %a
      }
    }
  }
}
menu query {
  Blacklist Reason : .hadd -m Blacklist $nick $$?="Reason"
}
menu channel,nicklist,status {
  Blacklist
  .PM Spammer blacklist add $iif(!$snicks,$$?="Nick or nicks to be added",$snicks) PM Spammer
  .Flooder blacklist add $iif(!$snicks,$$?="Nick or nicks to be added",$snicks) Flooder
  .Custom : blacklist add $iif(!$snicks,$$?="Nick or nicks to be added",$snicks) $?="Common Reason"
  ; If common reason isn't included, you will be asked for a reason for each nick
}
menu channel,status {
  Blacklist
  .Remove : .hdel Blacklist $$?="Name to be removed"
}

  


I think I got everything you asked for, as well as some items you didn't ask for.

Last edited by RusselB; 01/10/06 09:57 PM.
#160906 01/10/06 09:15 PM
Joined: Apr 2006
Posts: 464
O
Fjord artisan
OP Offline
Fjord artisan
O
Joined: Apr 2006
Posts: 464
Quote:
I saw your last post about half-an-hour after you posted it, and wrote this up in about the remaining half-hour.


That's what I mean, I will take me at least a week, to get anything decent going.

Thank you VERY much for this RusselB, I'm gonna test it and I will let you know. Thx a lot!

#160907 01/10/06 09:35 PM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
If something like that would take you a week, then I suggest you cringe at the thought of trying something like my Channel Control Dialog (which I'm still working on, so don't bother looking for it), which I've been working on for the past 9 months (I hope to have it done for the new year)

#160908 01/10/06 09:42 PM
Joined: Apr 2006
Posts: 464
O
Fjord artisan
OP Offline
Fjord artisan
O
Joined: Apr 2006
Posts: 464
omg, now thats called patience.

I've testing a little, and found these points:
- it seems to ban on nick but not on address. Can it work by address (*!*@host)?
- the serverop event, how does that work? I'm not an server op, just a channel op.
- BLACKLISTSCAN Unknown command (triggered when someone joined the channel) smile
- The right-click menu in a query, gives me "Blacklist reason", can that be changed to:
Blacklist -->
.PM spammer
.Flooder
.Specify Reason

Thx in advance again!

#160909 01/10/06 09:47 PM
Joined: Apr 2006
Posts: 464
O
Fjord artisan
OP Offline
Fjord artisan
O
Joined: Apr 2006
Posts: 464
* /inc: insufficient parameters (line 30, Blacklist.mrc)

Hmm, that one also popped up.
Dont know when it triggered, but noticed it in the status window.

#160910 01/10/06 09:59 PM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
original code edited & corrected

#160911 01/10/06 10:05 PM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
The mask 2 in the ban command makes mIRC look up the address for the nick, then ban using the format you wanted. It shows to you as the nick being banned, but in reality it's the address that's being banned.
The serverop event is for if the server ops you in the channel, rather than a person/bot that's in the channel.

Other errors and requests changed in original code.

#160912 01/10/06 10:06 PM
Joined: Apr 2006
Posts: 464
O
Fjord artisan
OP Offline
Fjord artisan
O
Joined: Apr 2006
Posts: 464
Thank you!
Have to work tomorrow, so bedtime for me now.
But I'll test it some more tomorrow!

Thanks Russel

#160913 01/10/06 10:32 PM
Joined: Apr 2006
Posts: 464
O
Fjord artisan
OP Offline
Fjord artisan
O
Joined: Apr 2006
Posts: 464
Hmm, I still cant really get the blacklist to work, when I am chatting with someone in a query, and I want to add him to the blacklist.

I also seem to get some errors, when I'm right-clicking the channel or status windows. It starts asking for reasons and nicks :tongue:

I dunno, I'll check it some more tomorrow.

#160914 01/10/06 10:51 PM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
OK...and I'll give the script a bit more of a work out tonight, and see if I can catch any other problems.

#160915 02/10/06 07:34 PM
Joined: Apr 2006
Posts: 464
O
Fjord artisan
OP Offline
Fjord artisan
O
Joined: Apr 2006
Posts: 464
Ok, I've been testing some more tonight, and I have some remarks:

- When no nick/nicks have been selected from the nicklist and I right-click the channel window, it asks me to input nicks. I obviously use right-click channel menu also for other things, then blacklisting people smile

- When I right-click a user in a channel, it shows me PM Spammer and Flooder, but both options are grayed out. I'm not able to select them.

- When I right-click a user in a channel, and I specify a custom reason, it adds the user to the blacklist, but the reason is added twice (nick reason reason).

- When I right-click the channel or status menu, there should be no blacklist option. Since I'm not gonna blacklist an entire channel. It should only be present in the nicklist and query menu's.

- I don't really understand the kick-counter. It should be a global counter, in the variables list or something. And only increase when I kick someone.
At the moment it seems to count how many times someone was kicked (count.nick). But not only by me, also by others.

Would it be possible, to remove the aliasses from the script, and just replace the actual commands for it?
That way I should be able to tune the script a little more myself as well. Just the basic adding users to the hash with pre-set reason or with specified reason, looking the user up when he joins the channel and the ability to remove people from the list?

Again, I really appreciate your efforts in this RusselB!

#160916 02/10/06 09:35 PM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Going through your points one at a time, in the order you mentioned them (I'll post a re-code later).
1) Right clicking on the channel should've given you a Blacklist option along with the rest of your channel right click options. I have found the problem with it defaulting to asking for nicks, and resolved it. The option was added in case you wanted to add someone to the black list that was no longer in the channel (eg: someone joining, spamming the channel with an advertisement, then leaving)

2) The greyed out options have been resolved, and were due to the same problem that was causing the problem solved in #1.

3) I noticed this also, and while I can see what is causing it, I'm going to need a bit more time to figure out a proper resolution for it.

4) Reference answer #1 for my reasoning on having the options available in the status & channel menus. Removing the option is easily enough done if you really don't want it.

5) The kick counter is stored in the hash file, and tracks the number of times the particular nick was kicked, rather than the total number of kicks. When you said about a kick counter, I didn't realize that you only wanted it to count when you kicked someone. Adding that condition is easy.

6) Removal of the aliases is possible, but would increase the amount of code significantly since the code that is in each alias would have to be replicated for each part of the code where the alias is currently being called. I do not recommend this, as it would mean haing to make 5 changes to the code, rather than 1 change in the alias.

#160917 02/10/06 09:45 PM
Joined: Apr 2006
Posts: 464
O
Fjord artisan
OP Offline
Fjord artisan
O
Joined: Apr 2006
Posts: 464
Alright, cool.
Sure keep the alias, I'll learn to work with those instead in that case smile

Looking forward to the updated version!

#160918 02/10/06 10:10 PM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Code:
 on *:start:{
  if !$hget(Blacklist) { .hmake Blacklist 100 }
  if $exists(Blacklist.hsh) { .hload Blacklist Blacklist.hsh }
}
on *:exit:{
  .hsave -o Blacklist Blacklist.hsh
}
on *:disconnect:{
  .hsave -o Blacklist Blacklist.hsh
}
on !*:join:#:{
  if $hget(Blacklist,$nick) {
    echo -a Blacklisted $nick has joined $chan
    if $me isop $chan {
      .ban -k $chan $nick 2 $hget(Blacklist,$nick) Kick $chr(35) $hget(Blacklist,$+(Count,.,$nick))
    }
  }
}
on *:op:#:{
  blacklist scan $chan
}
on *:serverop:#:{
  blacklist scan $chan
}
on *:ban:#:{
  if $nick = $me {
    .ignore $bmask
  }
}
on *:kick:#:{
  if $nick == $me {
    hinc Blacklist $+(Count,.,$knick))
  }
  updatenl
}
alias blacklist {
  if $1 == add {
    set %reason $gettok($2-,1--1,32)
    set %nicks $gettok($2-,-1,32)
    if %nicks == $2- {
      set %nicks $$?="Nick(s) to be added to blacklist"
    }
    set %nicks $replace(%nicks,$chr(44),$chr(32))
    var %a = 1, %b = $numtok(%nicks,32)
    while %a <= %b {
      .hadd -m Blacklist $gettok(%nicks,%a,32) $iif(%reason,$v1,$$?="Blacklist Reason")
      inc %a
    }
  }
  elseif $1 == del {
    set %nicks $2-
    set %nicks $replace(%nicks,$chr(44),$chr(32))
    var %a = 1, %b = $numtok(%nicks,32)
    while %a <= %b {
      .hdel Blacklist $gettok(%nicks,%a,32)
      inc %a
    }
  }
  elseif $1 == scan {
    if $me isop $2 {
      var %a = 1
      while %a <= $nick($2,0) {
        if $hget(Blacklist,$nick($2,%a)) {
          .ban -k $1 $nick($2,%a) 2 $hget(Blacklist,$nick($2,%a)) Kick $chr(35) $hget(Blacklist,$+(Count,.,$nick($2,%a)))
          dec %a
        }
        inc %a
      }
    }
  }
}
menu query {
  Blacklist Reason : .hadd -m Blacklist $nick $$?="Reason"
}
menu channel,nicklist,status {
  Blacklist
  .PM Spammer : blacklist add PM Spammer $snicks 
  .Flooder : blacklist add Flooder $snicks
  .Custom : blacklist add $?="Common Reason" $snicks 
  ; If common reason isn't included, you will be asked for a reason for each nick
}
menu channel,status {
  Blacklist
  .Remove : blacklist del $$?="Name(s) to be removed"
}
 


I think that should be a final code. I did test it briefly, and all of the noted problems have been resolved.

Also, in the areas where you are asked for nick(s)/name(s), the code has been set to accept multiple entries, with the entries being separated by either space or comma.

#160919 02/10/06 10:34 PM
Joined: Apr 2006
Posts: 464
O
Fjord artisan
OP Offline
Fjord artisan
O
Joined: Apr 2006
Posts: 464
Alright, that does look good.
I'll play a little with it, and see how it works.

Thanks for all the help RusselB!
Much appreciated!

Joined: Feb 2007
Posts: 28
S
Ameglian cow
Offline
Ameglian cow
S
Joined: Feb 2007
Posts: 28
It works pretty well but, there's a slight problem..

when i open ( Blacklist.hsh ) using notepad, wordpad, ms word and etc.. i cant view the list of the nicks/host/ip i placed on my blacklist.

how can i view them and edit it manually? for instance >> *!*@username.* and i want to change it to *!*hers@username.*

sorry for the narking fellaz .. i cant figure it out how to open the file.

Joined: Jan 2007
Posts: 1,156
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
I save my hash tables as a text document. This may help but you will still see it as a saved hash table.

1stItem[]data[]2ndItem[]Data[]3rdItem[]data

and so on.

Joined: Feb 2007
Posts: 28
S
Ameglian cow
Offline
Ameglian cow
S
Joined: Feb 2007
Posts: 28
Sorry mate, i didn't get you .. how will i change the save as to text?

and what code is these?
-----------------------
>> 1stItem[]data[]2ndItem[]Data[]3rdItem[]data
-----------------------
where will i place those?

Thank you for the reply.. =)

Joined: Jan 2007
Posts: 1,156
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
.hsave -uo Blacklist Blacklist.txt <just change the file type.

What I showed you is just a representation of what the hash table looks like in a document.

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Unless you use the -i switch with the /hsave command, it will always save the information in a text format. I simply use the .hsh extension so that I know that the file was made for a hash table.

These files can be directly edited, but the edit won't affect the information in the hash table until the file is loaded into the hash table using the /hload command.

So, if you want to manually edit the file, use the word processor of your choice, then save the file in a DOS text format (You may need to use the Save As option), then use /hload to load the edited file into the hash table.

Joined: Jan 2007
Posts: 1,156
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
That seems rather involved and complicated. Yeah the file extension is .hsh but when you double click what does your computer tell you? It should tell you that the extension isn't recognized, what program do you want to use to view it with. And you would most likely choose notepad.

Or you can just save it as a .txt file and eliminate any hassle. This is what i do anyways.

$iif(!$hget(user),hmake user)
$iif($file(lists\user.txt).shortfn,hload user $ifmatch)

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
What is your /hsave command? If save it in binary format then you won't be able to read anything. If you save it in normal format, it will look like DJ_Sol's example. And if you save it in INI format, it will look like an INI file.


Invision Support
#Invision on irc.irchighway.net
Joined: Oct 2006
Posts: 342
L
Fjord artisan
Offline
Fjord artisan
L
Joined: Oct 2006
Posts: 342
what about if he used other nick but still on the same computer
in short same host or maybe ident


learn learn learn
Joined: Feb 2007
Posts: 28
S
Ameglian cow
Offline
Ameglian cow
S
Joined: Feb 2007
Posts: 28
Can anyone help me what's wrong on these codes? When i load it on my remote script, my mIRC will freeze and hang =(
-------------------------------------------------
on *:OP:#:{
if ($opnick == $me) { set %ctr 1 | set %check $ulist(*,%ctr)
while (%check != $null) {
if (stick isin $level(%check)) { set %kick-check $ialchan($ulist(%check,stick,1),#,1) | if (%kick-check) { mode # +b %check | .timer 1 1000 mode # -b %check | fkick # %check $ulist(*,%ctr).info } }
else if (%check ison #) mode # +v %check | inc %ctr 1 | set %check $ulist(*,%ctr)
}
}
unset %ctr %check %kick-*
}

alias -l fkick { var %fkick-total = $nick($1,0,a) | var %fkick-ctr = 1 | :loop | if (($nick($1, %fkick-ctr, a) != $me) && ($2 iswm $address($nick($1, %fkick-ctr, a),5))) kick $1 $nick($1, %fkick-ctr, a),5) $3- | if (%fkick-ctr < %fkick-total) { %fkick-ctr = %fkick-ctr + 1 | goto loop } | unset %fkick-total %fkick-ctr }
-------------------------------------------------

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Ok, because reading something that looks like that is really annoying, let me first put it into what I consider to be the preferable way of writing code:

Code:
on *:OP:#:{
  if ($opnick == $me) {
    set %ctr 1
    set %check $ulist(*,%ctr)
    var %total = $ulist(*,0)
    while (%ctr <= %total) { 
      if (stick isin $level(%check)) {
        set %kick-check $ialchan($ulist(%check,stick,1),#,1)
        if (%kick-check) {
          mode # +b %check
          .timer 1 1000 mode # -b %check
          fkick # %check $ulist(*,%ctr).info
        }
      }
      elseif (%check ison #) mode # +v %check
      inc %ctr 1
      set %check $ulist(*,%ctr) 
    }
  } 
  unset %ctr %check %kick-*
}

alias -l fkick {
  var %fkick-total = $nick($1,0,a)
  var %fkick-ctr = 1
  :loop
  if (($nick($1, %fkick-ctr, a) != $me) && ($2 iswm $address($nick($1, %fkick-ctr, a),5))) {
    kick $1 $nick($1, %fkick-ctr, a),5) $3-
  }
  if (%fkick-ctr <= %fkick-total) {
    inc %fkick-ctr
    goto loop
  }
}


I also made some minor changes. See if it works. Btw, you could use /var instead of /set on your variables. I didn't bother changing those, but you might as well. Then you don't need to use /unset. And, GOTO is usually frowned on.


Invision Support
#Invision on irc.irchighway.net
Joined: Feb 2007
Posts: 28
S
Ameglian cow
Offline
Ameglian cow
S
Joined: Feb 2007
Posts: 28
--------------------
on *:OP:#:{
if ($opnick == $me) {
set %ctr 1
set %check $ulist(*,%ctr)
var %total = $ulist(*,0)
while (%ctr <= %total) {
if (stick isin $level(%check)) {
set %kick-check $ialchan($ulist(%check,stick,1),#,1)
if (%kick-check) {
mode # +b %check
.timer 1 1000 mode # -b %check
fkick # %check $ulist(*,%ctr).info
}
}
elseif (%check ison #) mode # +v %check
inc %ctr 1
set %check $ulist(*,%ctr)
}
}
unset %ctr %check %kick-*
}

alias -l fkick {
var %fkick-total = $nick($1,0,a)
var %fkick-ctr = 1
:loop
if (($nick($1, %fkick-ctr, a) != $me) && ($2 iswm $address($nick($1, %fkick-ctr, a),5))) {
kick $1 $nick($1, %fkick-ctr, a),5) $3-
}
if (%fkick-ctr <= %fkick-total) {
inc %fkick-ctr
goto loop
}
}
--------------------
Still no effect bro =( the codes cannot read on what is written on my stick list i.e. no kick/ban will happen. Regarding the freeze it works pretty much fine. but, my intention is to read the roster on my ( users ) remote..

like instance:
stick:*spammer*!*@* porn bots
stick: *!*@username.undernet.org flooder

Well, i hope you can assist me this time .. thnx in advance =)

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Just to check... are you sure your named levels are BEFORE your numerical levels?

You can't have:

100:test!*@*
500:test2!*@*
stick:test3!*@*

You need to put the named level (stick) before the numerical levels (100 and 500) or else $level shows that "stick" is the last numerical level of 500. I'm not sure if that's supposed to do that, but my test showed that to be the case on 6.21.


Invision Support
#Invision on irc.irchighway.net
Joined: Feb 2007
Posts: 28
S
Ameglian cow
Offline
Ameglian cow
S
Joined: Feb 2007
Posts: 28
Yes, im using ( stick: *!*@test.* reasononkick ) still no progress on that, i've change it a couple of times though, it cannot scan all the listed nicks/host/usernames on my (users-remote) list..

by the way, the on-join kick is working very well .. but my problem is during - on *:OP:#:{ - my codes is not functioning at all..

Are there any remedy on this backbreaking problem? =)

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
It seems to work fine in the quick test I did. Do this...

After:
Code:
    while (%ctr <= %total) { 


Insert:
Code:
      echo -a $level(%check)


Then get opped. You should see "stick" echoed the number of times equal to the number in your userlist.


Invision Support
#Invision on irc.irchighway.net
Joined: Feb 2007
Posts: 28
S
Ameglian cow
Offline
Ameglian cow
S
Joined: Feb 2007
Posts: 28
i tried again mate, it will only show the echo "stick" but will not kick whats on the sticklist. =(
----------
* MINXY sets mode: +o gringler`
stick
stick
stick
stick
stick
stick
stick
stick
----------
here's the code i loaded on my remote..
---------------------------------------
on *:OP:#:{
if ($opnick == $me) {
set %ctr 1
set %check $ulist(*,%ctr)
var %total = $ulist(*,0)
while (%ctr <= %total) {
echo -a $level(%check)
if (stick isin $level(%check)) {
set %kick-check $ialchan($ulist(%check,stick,1),#,1)
if (%kick-check) {
mode # +b %check
.timer 1 1000 mode # -b %check
fkick # %check $ulist(*,%ctr).info
}
}
elseif (%check ison #) mode # +v %check
inc %ctr 1
set %check $ulist(*,%ctr)
}
}
unset %ctr %check %kick-*
}

alias -l fkick {
var %fkick-total = $nick($1,0,a)
var %fkick-ctr = 1
:loop
if (($nick($1, %fkick-ctr, a) != $me) && ($2 iswm $address($nick($1, %fkick-ctr, a),5))) {
kick $1 $nick($1, %fkick-ctr, a),5) $3-
}
if (%fkick-ctr <= %fkick-total) {
inc %fkick-ctr
goto loop
}
}
---------------------------------------
and on the users remote script editor are the following..
---------------------------------------
stick:*!*@rangermorex.*
stick:*!*@versatilecreep.*
stick:*!*@207.177.*
stick:*!*@201.125.*
stick:*MINXY*!*@*.*
stick:*bambi`no*!*@*.*
stick:*!*@*.roxel.net
stick:*!*@*.pixel.org
---------------------------------------
im using the lastest version mIRC v6.21 Khaled Mardam-Bey

Could you please enlighten me, thnx for your help bro =)

Joined: Jan 2007
Posts: 1,156
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
try this...

Code:
on *:OP:#:{
  if ($opnick == $me) {
    var %total = $ulist(*,0), %ctr = 1
    while (%ctr <= %total) {
      var %check = $ulist(*,%ctr)
      echo -a $level(%check)
      if (stick isin $level(%check)) {
        set %kick-check $ialchan($ulist(%check,stick,1),#,1)
        if (%kick-check) {
          mode # +b %check
          .timer 1 1000 mode # -b %check
          fkick # %check $ulist(*,%ctr).info
        }
        elseif (%check ison #) mode # +v %check
      }
      inc %ctr 1 | if (%ctr > %total) unset %kick-*
    }
  } 
}

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
The next step is to remove that echo line and insert one after:

Code:
set %kick-check $ialchan($ulist(%check,stick,1),#,1)


Insert this line after that one:

Code:
echo -a IAL: $ialchan($ulist(%check,stick,1),#,1)


See if you get all of your outputs from that or if they are blank.


Invision Support
#Invision on irc.irchighway.net
Joined: Feb 2007
Posts: 28
S
Ameglian cow
Offline
Ameglian cow
S
Joined: Feb 2007
Posts: 28
Still not progress on that bro.. by the way thank you for your endless assistance and tireless help guys..

I change the codes to this..
----------------------------
on *:op:#: {
if ($opnick == $me) {
set -u0 %mb.nick 1
while ($nick($chan,%mb.nick,a) != $null) {
if ($ulist($address($nick($chan,%mb.nick,a),5),stick,1) != $null) {
tokenize 32 $ulist($address($nick($chan,%mb.nick,a),5),stick,1).info
mode $chan +b $address($nick($chan,%mb.nick,a),$mb.read(banMask))
kick $chan $nick($chan,%mb.nick,a) ( Blacklisted! )
mode $chan +b $address($nick,2)
}
inc %mb.nick
}
}
}
----------------------------
it works pretty well and no freeze on this time..

=)

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
I see you dropped the IAL part. I thought that might be the issue. If it's not updated, then it won't have a value. Glad it's working.


Invision Support
#Invision on irc.irchighway.net
Joined: Feb 2007
Posts: 28
S
Ameglian cow
Offline
Ameglian cow
S
Joined: Feb 2007
Posts: 28
@Riamus2:
I cant get off my hands on this script man, i want to make this work coz it's more robust compared to the other one i just recently posted.

I inserted the codes as what you've told me, when i gain @'s in a channel the result is..
IAL:
IAL:
IAL:
IAL:
IAL:
and so on..

It's totally blank =) and it will not kick/ban =(

I have more than 50 ip/nicks/usernames on my sticklist..

I have noticed, when you have only less than 5 names in your sticklist it will kick sometimes on the first attempt, but when you add more than 50 names the script will not totally work.. =(

X'S:
When you are joining in a huge channel like more than 100 people, it will freeze and you will have to wait for a couple of minutes to restore your client so that you can click and type..

I hope we can sort this out, anythings possible =)

Thank you again for the updates guys =)

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
You will need to update your IAL before running the kicking part of that on OP event. I *think* you can do that with the /who command, but I never use the IAL, so I'm not sure. Until the echo displays text after the IAL, you know that it's not going to work because the IAL isn't updated. Once you have it working, you can remove the ECHO line.

As for the "freeze" with a large channel, that's the problem when you're checking so many people at once.


Invision Support
#Invision on irc.irchighway.net
Joined: Jan 2007
Posts: 1,156
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
You are correct, IAL will not update with /who $chan. The indiviual user has to make some sort of action. This is the downfall of IAL and why I created my own. crazy

Joined: Feb 2007
Posts: 28
S
Ameglian cow
Offline
Ameglian cow
S
Joined: Feb 2007
Posts: 28

yeah, i concur about IAL update .. well, i think i dont have much choice but to stick with this code..
Code:
on *:OP:#: {
  if ($opnick == $me) {
    set -u0 %mb.nick 1
    while ($nick($chan,%mb.nick,a) != $null) {
      if ($ulist($address($nick($chan,%mb.nick,a),5),stick,1) != $null) {
        tokenize 32 $ulist($address($nick($chan,%mb.nick,a),5),stick,1).info
        mode # +b $address($nick($chan,%mb.nick,a),$mb.read(banmask))
        kick # $nick($chan,%mb.nick,a) ( Blacklisted! )
      }
      inc %mb.nick
    }
  }
}

it is very effective! no need to IAL update it will boot what's on your list in no time..

Thank you for your endless response guys! =)

Joined: Oct 2006
Posts: 342
L
Fjord artisan
Offline
Fjord artisan
L
Joined: Oct 2006
Posts: 342
maybe this is just for nick blacklist and not for ip/hotmask


learn learn learn
Joined: Feb 2007
Posts: 28
S
Ameglian cow
Offline
Ameglian cow
S
Joined: Feb 2007
Posts: 28
yeah exactly for nick, on my roster most are consist of nicks and if i'll ban someone on ip/hostmask i'll use the cservice bot. =)

Thnx for the concern bro.. Cheers!

Joined: Oct 2006
Posts: 342
L
Fjord artisan
Offline
Fjord artisan
L
Joined: Oct 2006
Posts: 342
hehehe i`m asking if it could be done like that code but for hotmasks too not only nicks.. laugh


learn learn learn
Page 1 of 3 1 2 3

Link Copied to Clipboard