mIRC Home    About    Download    Register    News    Help

Print Thread
Page 2 of 3 1 2 3
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

Page 2 of 3 1 2 3

Link Copied to Clipboard