PDA

View Full Version : Another irc question...bans


AphexTwin
19-07-2001, 01:02
My m8 who is using VirC (hmm) Can ban someone who isnt wanted in a wireplay room automatically when he joins, saying something along the lines off

ban etc You are not help here, Be gone.

As the message he automatically says when they join, Now i have tryed all bans under the sun to keep some people away and they havent worked :{

Anyone got any idea, say if Piner joins #wptfc, how my script would pick that up, without me been at my pc etc :)

Thanks :p

GameGuru
19-07-2001, 01:34
Simple stuff :)


on *:join:#wptfc: {
if ( $nick == Piner ) { msg $chan ban $nick You are banned from this chatroom }


That assumes you wish to use the bots to ban the nickname. If you actually want to do it yourself


on *:join:#wptfc: {
if ( $nick == Piner ) { ban #wptfc $nick | kick #wptfc $nick You are banned from this chatroom }


You can make it more complex and ban the ip address and stuff, but I'm too tired to make and check the code, so this will have to do for now :)

[Edited by GameGuru on 19-07-2001 at 01:37 AM]

Bad-Co
19-07-2001, 08:40
on 1:Join:#gpchat:{
if ( $nick == monkee || $address($nick,3) == %llama) {
/msg bot auth <YOU> <PASSWORD>
/set %llama $address($nick,3)
/msg $chan ban %llama
/msg $chan kick $nick }
}


I've added a couple of bits for various reasons..

1, It auto auth's in case you forgot
2, It bans on there nickname and address

Its not full proof...but a needs a bit more effort to bypass.


**note** No offence to Monkee, I wouldn't ban you for no reason :P (/me uncrosses fingers)

GameGuru
20-07-2001, 00:58
Good stuff, no need for the / in the script tho, mIRC recognises them as commands anyway (just in case anyone was wondering, I'm sure Dan already knows that :))

Waller
21-07-2001, 02:19
My m8 who is using VirC (hmm) Can ban someone who isnt wanted in a wireplay room automatically when he joins

That sounds quite like my auto-ban script (although probably better), which is all very well and good in its own useless way. :)

[12:02:37] *** DrugMonkey (simon_gary@62.7.12.76) has joined channel #gpchat
[12:02:37] <Waller> ban Drugmonkey You're not welcome here! (Auto-Ban script. You can't come in any channel where I'm opped, so don't bother. Ph34r the auto-ban script)
[12:02:48] <DrugMonkey> shush
[12:02:54] <DrugMonkey> y am i banned?
[12:02:59] <Tenshi|Aweh> ;[
[12:03:19] <DrugMonkey> come on.......
[12:03:21] [Waller] Now I'm realising why altering my ban script wasn't a good idea.
[12:03:24] <DrugMonkey> y am i banned?
[12:03:25] <Reality|away> ban DrugMonkey you need to ask?

My version of the auto-ban script sadly goes off in all my channels, and not just ones where I have am added as an op, or are opped, which is embarrassing.

GameGuru
21-07-2001, 15:45
if ( $me isop $chan ) { msg $chan ban $nick sod orf! }

Ho Hum :)

Waller
21-07-2001, 18:45
GameGuru, if your previous post was directed at me, I don't think I've explained myself very well in my last post. Sorry.

I modified my auto-ban script on Virc (which only banned people on my banlist when I was opped) to work with GPbots, so it'd give the 'ban <their nick> You're not welcome etc.' message to the channel if they were on my banlist and the bots would ban them, so I wouldn't have to be opped.

My problem with it is the way it goes off in every channel I'm in, regardless of whether or not there's a GPbot in the channel or not, or if I'm added as an op on it.

GameGuru
22-07-2001, 01:06
If its VirC you're using then I'm afraid I can't really help you, my scripting knowledge is mIRC based and I haven't used any other IRC clients since mIRC does everything I want it to.

However if u wanted to do it in mIRC you'd just have to create a script that checked the channel the user joined, and if it was a channel you know you have ops in then ban that person, otherwise not do anything:


on *:JOIN:#: {
if (( $nick == n0rty_person ) || ( $nick == another_n0rty_person )){
if (( $chan == #chan_I_have_ops_in ) || ( $chan == #other_chan_I_have_ops_in ) || ( $chan = #adinfinitum ))
{ msg $chan ban $nick You shouldn't be in here, cos I 0wn j00... }
}
}

Waller
22-07-2001, 18:08
I worked out how to do it earlier today by accident, whilst trying to make my 'Hi. I want you all sexually. Did I mention I'm a one-man sperm bank?' script only go off in certain channels. Thanks anyway.