This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Devoice A BlackList User On Join

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
S
Striker
Voice
Posts: 3
Joined: Tue Apr 17, 2012 4:27 am

Devoice A BlackList User On Join

Post by Striker »

Hello I Need A Small Script For Devoice Black List User.
But The Bot Recognize The BlackList User From Their Host For Example I Want To Add Host 119.73.* To Black List.
Any User Join From This Ip Range The Bot Will Auto Devoice The User
Waiting For Reply Thanks :)
w
willyw
Revered One
Posts: 1203
Joined: Thu Jan 15, 2009 12:55 am

Re: Devoice A BlackList User On Join

Post by willyw »

Are the actual IPs hidden? ... some irc servers show not the IP of a user, but a hostmask (or whatever they call it).

Do /whois <nick>
on a few users, and see what you get.

Then, you can experiment:
Add a user to your bot. Just make up a handle.
Then do:
.+host <handle> 119.73.*
or whatever seems to match, based on what you learned with the /whois

Check your work, with:
.whois <handle>
and examine the HOSTS line

Then do:
.chatter <handle> +q
to give this user the q flag

You can read about the flags with:
.help whois

This is the q flag:
q - quiet (user cannot gain voice on any channel)

Note:
If you try to experiment, by voicing this user, to see if the bot will de-voice them, do the voicing by somebody other than yourself (owner) or bot itself.

I hope this helps.
S
Striker
Voice
Posts: 3
Joined: Tue Apr 17, 2012 4:27 am

Post by Striker »

Not Working :(
Can U Write A Code Please
w
willyw
Revered One
Posts: 1203
Joined: Thu Jan 15, 2009 12:55 am

Post by willyw »

Striker wrote:Not Working :(
You forgot to describe exactly what you did, and exactly what happened.
Can U Write A Code Please
Not without more information.
S
Striker
Voice
Posts: 3
Joined: Tue Apr 17, 2012 4:27 am

Post by Striker »

On Mirc My Addon Looks Like

Code: Select all

on @*:join:#:{
if ($regex($wildsite,/1[01][0-9](\.|-)7[3-9]+/)) {
mode # -v $nick
}
I Need The Same Code in tcl
User avatar
Madalin
Master
Posts: 310
Joined: Fri Jun 24, 2005 11:36 am
Location: Constanta, Romania
Contact:

Post by Madalin »

Try this

Code: Select all

bind JOIN - * egghelp:join

set temp(jdevoice) #channel

proc egghelp:join {nick uhost hand chan} {
	global temp

	if {[string tolower $temp(jdevoice)] == [string tolower $chan]} {
		if {[string match -nocase "119.73.*" [lindex [split $uhost @] 1]]} {
			pushmode $chan -v $nick
		}
	}
}
Post Reply