• Welcome to Valhalla Legends Archive.
 

/who Problem

Started by TriCk, September 04, 2003, 12:50 AM

Previous topic - Next topic

TriCk

Ok Heres another problem, I need to make the bot ban Operators too ... which have "[" name "]" and i was wondering how would i remove this from a message...

I've already got down that UCase(Message) is needed mostlikely... but i don't know how to remove "[" "]" from the start and end of names ...

Camel

Use Mid$(String, Start, [Length]) -- read my reply here.

Dark-Feanor

The problem is how to tell if it is an operator or just some guy with [] around his name with caps. There would probably be more use to banning the person with the []s around his name, because there is a very small likelyhood that channel ops will be joining your channel.
- Feanor[xL]
clan exile
Firebot
iago: "caps lock is like cruise control for cool"

TriCk

yeah feanor i figured that but, if a w3 is ops ... @Lordaeron] will be displayed (West), so that one would be banned...

Camel

Quote from: DaRk-FeAnOr on September 04, 2003, 01:28 AM
The problem is how to tell if it is an operator or just some guy with [] around his name with caps. There would probably be more use to banning the person with the []s around his name, because there is a very small likelyhood that channel ops will be joining your channel.

There's no extremely effective way to do this without using a /whois, and in that case you're better off just sending two bans and letting one fail as it will require less work and fewer packets.

TriCk

True, well thanks guys, i figured out SweepBan :)
Works perfect

UserLoser

What are you going to do if someone has a name like [USERLOSER], and they're not really an operator? ;D

Hitmen

That's what the entire thread was about...........

UserLoser

Quote from: Hitmen on September 05, 2003, 07:08 PM
That's what the entire thread was about...........

No, he asked how to avoid the [ and ] in a username, which would usually mean that the user is an operator when doing /who <channel>.  Which that wouldn't be the best way to ban all the users in a channel, which I stated in my reply.

dxoigmn

Quote from: UserLoser on September 05, 2003, 07:59 PM
No, he asked how to avoid the [ and ] in a username, which would usually mean that the user is an operator when doing /who <channel>.  Which that wouldn't be the best way to ban all the users in a channel, which I stated in my reply.

Yes but Camel explained above about that situation and suggested a fix.

UserLoser

#10
oh well, i don't tend to read long posts that don't intrest me or matter to me at all

Eric

and yet you reply to them?

Grok

The standard should be to remember a user's flags.

When it comes time to ban, check the flags.  Don't waste your time trying to ban someone who is unbannable, such as an operator.

However you keep track of users, an array or whatever, should keep track of flags as well.


Public Type USER_LIST_ENTRY
   UserName As String
   BnetFlags As Long
End Type
Public ChannelUsers() As USER_LIST_ENTRY


Dozens of ways to do it, that's just a suggestion.  Doing a "/who" should never be necessary if you have been tracking users adequately.

Kp

... they want to ban all users who are in a channel other than the one in which the bot presently resides.  Why such a waste of queue space is desired is beyond me, however.
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!

Camel

Quote from: Kp on September 06, 2003, 02:38 PM
... they want to ban all users who are in a channel other than the one in which the bot presently resides.  Why such a waste of queue space is desired is beyond me, however.

This is what I said when I was asked to include a sweepban feature in my bot. Naturally, I refused. However, due to popular demand, I added a very simple scriptable version that was disabled by default (note how all of the code is commented out).

Apparantly 'sweepban' is effective against flooders and spammers. I don't see how this is effective at all as bans go by cd key and not IP, but many users have figgured out that a simple alteration of the code to make it 'sweepsquelch' is very effective.

All of this to me is just fluff. The way I deal with flooders is to check if someone triggers too many concurrent 0x0F packets in a short enough time to be considered a flooder. If a flood is detected, the bot goes into lockdown mode for 60 seconds. Lockdown mode will ban any unrecognized user upon joining the channel.