Skip to content
MSN

Word kick;(

A TG007 community discussion started by Gazzy.

Discussion 12 posts
Page 1 of 1
Open
Topic #6064 · 12 published posts · 1,434 views

I feel like a tol noob for askin this but anyway;

 

on *:TEXT:*:#: {
  var %x = $numtok($1-,32)
var %y = 1
  while (%y <= %x) {
    if ($gettok($1-,%y,32) isin %g) { sockwrite -n $chan kick $chan $nick }
inc %y
  }
}

 

right i made that code so its supposed too.. scan every $1, $2, $3, $4 in a sentence etc, then kick if it finds that in g, so say i set %g to gazzy blah blah, and they say gazzy itll kick but if they say anything else like hi! itll just freeze my mirc any ideas? lol

not quite sure about this code, but i see you have it to check if whatevers in %g... you haven't set %g anywhere in that script. just a thought.

Yea, the %g is set in the variables

its cause if they only say one word %y will be equal %x so it looks like its going in a loop

 

try this

on *:TEXT:*:#: {
tokenize 32 $1-
if ($matchtok($1-, %g, 1, 32) >= 1) { sockwrite -n $chan kick $chan $nick }
}

 

btw i havnt tested this , its just off top of my head

Edited Feb 20, 2006 12:42 AM by Ozzy10

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

Wohoo cheers :)

i take it that it worked

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

Oh.. wait :( if i set %g to two or more words like /set %g kick word it doesnt do anything.. i wanted to set %g to kick words, profanity and if any of them words are in what people say it kicks

Edited Feb 20, 2006 12:51 AM by Gazzy

well i asumed you was setting one word lol

i didnt know %g was going to be loads of words lol

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

lmao ah well

 

I got it to work thanks for the help :)

You could make it read from a txt or .ini file, but I dunno. Might be long or lag.

i use an ini file and there is no lag

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

I ended up with this in the end btw lol

 

on *:TEXT:*:#: {

var %x = $numtok($1-,32)

while (%x) {

if ($wildtok(%g, $gettok($1-,%x,32), 0, 32) => 1) { sockwrite -n $chan kick $chan $nick Profanity | return }

dec %x

}

}