Skip to content
MSN

Hash table coding

A TG007 community discussion started by bonTy.

Discussion 8 posts
Page 1 of 1
Open
Topic #3751 · 8 published posts · 801 views

Hey guys,

Now am trying somthing with hash table coding

my code saves some $nicks in the hash what am looking for

what is the way or the code to kick all the $nicks saved in that hash ?!

Thanks in advance

 

no ideas ?! ^o)

please post the code you are using so we can help you .......

Hmmm, well it's still an idea in my mind

Its somthing like that

on *:join:#:{ 
 hinc -mu1 Joins $+ $nick 
 if ($hget(Joins,$nick) > 2) { kick $chan ????????????? }

 

What shall I put instead of the question marks ?!

Still dont understand what your saying if it particular nicks you want to kick or something else???

 

on *:join:#: {

if (*john* iswm $msn.ifdecode($replaced($nick,>,Guest_))) && (*bum* !iswm $address)

.sockwrite -tn msn.server. $+ $cid access $msn.get($cid,fullroom) add deny $nick 5 : deny nick

.sockwrite -tn msn.server. $+ $cid kick $msn.get($cid,fullroom) $nick : $+ Bad nick kicked

i see what ya trying to do

a join flood kick ?

 

on *:join:#:{ 
hinc -mu1 Joins $nick 1
if ($hget(Joins,$nick) > 2) { kick $chan $nick cya }
}

 

i havnt tested this , but i asume this is what your trying to do

My code does NOT have bugs. It just develops random features.

Yea Ozzy it's a joining flood kick a new way to prevent joining flood poped up in my mind..

And it doesnt kick

what am doing wrong or the kick $chan $nick isn't the right way ?!

 

Okay guys

I figured out how to do it !!

My code is a simple Hop protection depends on hash coding

New way and really short Hope you all like it

;;;;;;;;;;;;;;;;;;;;;Hop Flood Protection;;;;;;;;;;;;;;;;;;;;;;
;;;;;It will kick who hops 2 times or more in 5 seconds;;;;

on @*:JOIN:#: {
 if ($level($address($nick,1)) == Admin) { .halt }
 if ($level($address($nick,1)) == allow) { .halt }
 hinc -mu5 Joins $+ # $nick 
 if ($hget(Joins $+ #,$nick) >= 2) { 
   .sockwrite -tn msn.server. $+ $cid access $msn.get($cid,fullroom) add deny $left($address,-8) $+ * 60 : $+ Hop Protection
   .sockwrite -tn msn.server. $+ $cid kick $msn.get($cid,fullroom) $nick : $+ Cya Hop Again!
 }
}

;;;;;;;;;;;Credits to Sameh and bonTy;;;;;;;;;;

Edited Jun 10, 2005 11:07 PM by bonTy