mIRC Home    About    Download    Register    News    Help

Print Thread
Page 1 of 2 1 2
#192773 09/01/08 10:23 PM
Joined: Jan 2008
Posts: 21
V
Ameglian cow
OP Offline
Ameglian cow
V
Joined: Jan 2008
Posts: 21
Hello all,

Im looking for a script i can putt in script editor (remote)

The script needs to kick all incoming users in the channel that er not voiced or opped in the channel.
After a time of 5 seconds or something.

Is this possible?

vinnie19 #192774 09/01/08 11:24 PM
Joined: Jan 2008
Posts: 44
J
Ameglian cow
Offline
Ameglian cow
J
Joined: Jan 2008
Posts: 44
Yes it is, i beleive it will be a simple script.
I am not very good on them but ill have a crack


#Plesh on QuaKenet
Jake Randall
Need help?
#Plesh - QuakeNet
Private Message Me Here!
vinnie19 #192779 10/01/08 01:27 AM
Joined: Jan 2003
Posts: 53
Z
Babel fish
Offline
Babel fish
Z
Joined: Jan 2003
Posts: 53
6 months since i scripted the last time, but should work =)

on *:join:#yourchannelhere: {
.timer $+ $nick 1 5 checkuser $chan $nick
}
alias checkuser { if (($2 !isop $1) && ($2 !isvoice $1) && ($2 ison $1)) kick $1 $2 kickreason }

this will not work if the user changes his nick instantly after he joined the chan, but that will happen pretty rarely i think...

vinnie19 #192787 10/01/08 03:07 AM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Here...

Code:
on @*:join:#yourchannel: {
  .timerKickRegs 1 5 KickRegs $chan
}
alias KickRegs {
  var %t = $nick($chan,0,r)
  while (%t) {
    kick $1 $nick($1,1,r)
    dec %t
  }
}


Just don't run it in a channel where there are a LOT of Regular users (not voiced/opped/etc) or you'll probably flood yourself off from kicking too many at once. If necessary, you can also throw a dynamic timer on the kick to avoid the problem, but based on what I think you're doing, it probably won't matter.


Invision Support
#Invision on irc.irchighway.net
Riamus2 #192794 10/01/08 01:22 PM
Joined: Jan 2008
Posts: 21
V
Ameglian cow
OP Offline
Ameglian cow
V
Joined: Jan 2008
Posts: 21
Originally Posted By: Riamus2
Here...

Code:
on @*:join:#yourchannel: {
  .timerKickRegs 1 5 KickRegs $chan
}
alias KickRegs {
  var %t = $nick($chan,0,r)
  while (%t) {
    kick $1 $nick($1,1,r)
    dec %t
  }
}


Just don't run it in a channel where there are a LOT of Regular users (not voiced/opped/etc) or you'll probably flood yourself off from kicking too many at once. If necessary, you can also throw a dynamic timer on the kick to avoid the problem, but based on what I think you're doing, it probably won't matter.


This script only kicks normal users (not voice or op)?

And im in a channel with not a lot of people.

EDIT: Tested the script but when i login als normal user then i dont get kicked i restarted my MIRC so i gonna check now again


And this one:
Code:
on *:join:#yourchannelhere: {
.timer $+ $nick 1 5 checkuser $chan $nick
}
alias checkuser { if (($2 !isop $1) && ($2 !isvoice $1) && ($2 ison $1)) kick $1 $2 kickreason }


Does that kick also OP because he checks it?

Last edited by vinnie19; 10/01/08 03:21 PM.
vinnie19 #192827 11/01/08 02:23 PM
Joined: Jan 2008
Posts: 21
V
Ameglian cow
OP Offline
Ameglian cow
V
Joined: Jan 2008
Posts: 21
Hmm nobody wants to help me anymore? frown

vinnie19 #192829 11/01/08 03:01 PM
Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031

You said in your original post that you didn't want voiced or opped users kicked...

Originally Posted By: vinnie19

kick all incoming users in the channel that er not voiced or opped in the channel



vinnie19 #192861 11/01/08 09:20 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
The script I gave you will only kick "Regular" users (i.e. Users who do not have any status in the channel including voice, op, etc), which is what you asked for.

Now, keep in mind 3 things with that script. First of all, the client running the script MUST be an op for it to work. Second, if the client running the script joins, it will not kick anyone at that time because it is obviously not an op at that time. Third, make sure you change the channel name to the channel you want it to work in.

To test it, make the client that has this script an OP (or higher) in a channel and change the channel name in the script to match. Then have someone join the channel and don't give that person voice/op/etc. Wait the 5 seconds and they should be kicked.


Invision Support
#Invision on irc.irchighway.net
Riamus2 #193406 19/01/08 03:21 PM
Joined: Jan 2008
Posts: 21
V
Ameglian cow
OP Offline
Ameglian cow
V
Joined: Jan 2008
Posts: 21
I tryed the scripts but the dont work confused frown

Can anybody help me with this one

vinnie19 #193482 19/01/08 09:27 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
"doesn't work" is about the least helpful thing you can say. *WHAT* does not work? What happens or doesn't happen? What messages/errors do you see? Etc. How are you running it? Is it in a bot or on your main client? Is the client running it opped? Is the client running it already in the channel and opped when someone joins who doesn't get voiced in the time frame? You see, more details are required for people to help.


Invision Support
#Invision on irc.irchighway.net
Riamus2 #193512 20/01/08 12:17 PM
Joined: Jan 2008
Posts: 21
V
Ameglian cow
OP Offline
Ameglian cow
V
Joined: Jan 2008
Posts: 21
Oke i got Dreambot running on the server but the commands doent work anymore from dreambot (dont know why) so i made my own script and loaded it in dreambot. Its just a simple script which gives some people OP and VOICE that are allowed in the channel. And you can use the script for commands (!op - !deop - !voice - !devoice - !kick) I putted the script under that script. (in the same script still). When a user enters there is happening nothing no errors no kicks. He can be in the channel as long as he wants as user (not voice or op). I putted in the script editor under Remote. The Dreambot client is +oa (opped and service admin i think). The dreambot client is running on a server in my own house. I tested the script with a other client on my own laptop.

vinnie19 #193539 20/01/08 11:49 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
You did change the channel name to match, right?

Other than that, put an ECHO line in the alias and in the event so that you can see where it's failing.

Insert the following into the first line in your event (right after the on TEXT line):

echo -a EVENT

Then, insert the following into the first line in your alias (right after the line that starts with "alias"):

echo -a ALIAS

That will narrow down the problem as it should work just fine.

Last edited by Riamus2; 20/01/08 11:51 PM.

Invision Support
#Invision on irc.irchighway.net
Riamus2 #193551 21/01/08 05:43 AM
Joined: Jan 2008
Posts: 21
V
Ameglian cow
OP Offline
Ameglian cow
V
Joined: Jan 2008
Posts: 21
Code:
on @*:join:#channel: { -a EVENT
  .timerKickRegs 1 5 KickRegs $chan
}
alias KickRegs { -a ALIAS
  var %t = $nick($chan,0,r)
  while (%t) {
    kick $1 $nick($1,1,r)
    dec %t
  }
}


I dont see any on TEXT.
But is this then correct (above)

vinnie19 #193554 21/01/08 11:20 AM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Sorry, meant on JOIN.

Just move the echo to the next line (inserting it as a new line) rather than having it on the lines you have it on. It may still work there, but it's better to have it on its own line. Then have someone join as usual. You should get both echoes... one immediately and one after the timer expires. Remember that the bot/client running the script has to be an op.


Invision Support
#Invision on irc.irchighway.net
vinnie19 #193569 21/01/08 05:04 PM
Joined: Oct 2007
Posts: 36
A
Ameglian cow
Offline
Ameglian cow
A
Joined: Oct 2007
Posts: 36
Originally Posted By: vinnie19

The script needs to kick all incoming users in the channel that er not voiced or opped in the channel.
After a time of 5 seconds or something.


Hi vinnie19!

You can set mode +N in your channel if you don´t want to have problems with nickchanges. And the code, for example this:

Code:
On @*:JOIN:#myroom:{
   set -u6 %nick $nick
   .timerkicks 1 5 userlook
}
alias userlook {
   if %nick isreg # { kick # %nick reason }
   else { halt }
}


If users aren´t in your access levels list, you must do this:
/msg ChanServ set #myroom restricted on
and only will join in your room users that be in your access list.

Bye smile

Last edited by asmodeo; 21/01/08 05:06 PM.

·´¯`·.¸¸“Jã¢k øf ãll ‡rãÐ꧅„…Mã§têR øf Nønꔸ¸.·´¯`·
asmodeo #193570 21/01/08 05:20 PM
Joined: Jan 2008
Posts: 21
V
Ameglian cow
OP Offline
Ameglian cow
V
Joined: Jan 2008
Posts: 21
asmodeo.

You code doesnt work nothing is happening.

Riamus2

I tryed it with -a EVENT and -a ALIAS but nothing happend i didnt get any error or some kind of messages

Last edited by vinnie19; 21/01/08 05:21 PM.
vinnie19 #193571 21/01/08 05:29 PM
Joined: Oct 2007
Posts: 36
A
Ameglian cow
Offline
Ameglian cow
A
Joined: Oct 2007
Posts: 36
It´s true, you try other code.

But reply this question, please. Exactly, Do you want kicked all users that haven´t got level in the channel?
In this form, test set mode in ChanServ:
/msg ChanServ SET #myroom restricted on

This´s the best form, I think.

Bye smile


·´¯`·.¸¸“Jã¢k øf ãll ‡rãÐ꧅„…Mã§têR øf Nønꔸ¸.·´¯`·
asmodeo #193575 21/01/08 06:45 PM
Joined: Jan 2008
Posts: 21
V
Ameglian cow
OP Offline
Ameglian cow
V
Joined: Jan 2008
Posts: 21
I just want a code im not asking to lock the channel. Its not for all time

vinnie19 #193586 21/01/08 10:18 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Originally Posted By: vinnie19
asmodeo.

You code doesnt work nothing is happening.

Riamus2

I tryed it with -a EVENT and -a ALIAS but nothing happend i didnt get any error or some kind of messages


That means that either you did not change the channel name in the script to match your channel like you were told to do or else you have a conflict with the on JOIN event. Put the script in a new, empty file and try again. And make sure you don't have remotes off (do other scripts work?).


Invision Support
#Invision on irc.irchighway.net
Riamus2 #193619 22/01/08 06:22 PM
Joined: Jan 2008
Posts: 21
V
Ameglian cow
OP Offline
Ameglian cow
V
Joined: Jan 2008
Posts: 21
I know i didnt forgot to change the channel.

I really putted the channel in the correct way. in the script.

And others scripts work which are in the script of me.

Page 1 of 2 1 2

Link Copied to Clipboard