mIRC Home    About    Download    Register    News    Help

Print Thread
Page 1 of 2 1 2
#220869 01/05/10 04:40 PM
Joined: Mar 2010
Posts: 17
V
Venus78 Offline OP
Pikka bird
OP Offline
Pikka bird
V
Joined: Mar 2010
Posts: 17
I need help from you all the code to kick someone if p2p would not answer. Because I have a bot set to capture the pedo. bot will kick the person does not answer the p2p. I really need help. "bot will ask the age

sorry my english is really bad

Venus78 #220873 01/05/10 07:12 PM
Joined: Jan 2007
Posts: 1,156
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
What's a p2p? You mean a whipser or a query?

DJ_Sol #220876 01/05/10 07:34 PM
Joined: Mar 2010
Posts: 17
V
Venus78 Offline OP
Pikka bird
OP Offline
Pikka bird
V
Joined: Mar 2010
Posts: 17
yea query

Venus78 #220886 02/05/10 12:05 AM
Joined: Feb 2009
Posts: 133
C
Vogon poet
Offline
Vogon poet
C
Joined: Feb 2009
Posts: 133
something like
Code:
on !*:join:#chan:{
  msg $nick hi $nick $+ , to avoid kick answer by: test ok
  set %test_ok $+ $nick 1
  timertestok 1 6 if $($+(%,test_ok,$nick),2) ban -ku600 # $nick 2 no answer
}
on *:text:*:?:if (($strip($1-2) == test ok) && ($($+(%,test_ok,$nick),2))) unset %test_ok $+ $nick


change #chan by yours


WorldDMT
chacha #220900 02/05/10 06:18 AM
Joined: Mar 2010
Posts: 17
V
Venus78 Offline OP
Pikka bird
OP Offline
Pikka bird
V
Joined: Mar 2010
Posts: 17
there is error

* /if: 'ban' unknown operator

Venus78 #220906 02/05/10 01:19 PM
Joined: Feb 2009
Posts: 133
C
Vogon poet
Offline
Vogon poet
C
Joined: Feb 2009
Posts: 133
was messing "()"
Code:
on @!*:join:#chan:{
  msg $nick hi $nick $+ , to avoid kick answer by: test ok
  set %test_ok $+ $nick 1
  timertestok 1 6 if ($($+(%,test_ok,$nick),2)) ban -ku600 # $nick 2 no answer
}
on *:text:*:?:if (($strip($1-2) == test ok) && ($($+(%,test_ok,$nick),2))) unset %test_ok $+ $nick

Last edited by chacha; 02/05/10 01:28 PM.

WorldDMT
chacha #220912 02/05/10 05:10 PM
Joined: Mar 2010
Posts: 17
V
Venus78 Offline OP
Pikka bird
OP Offline
Pikka bird
V
Joined: Mar 2010
Posts: 17
it work but not kicked n banned when not answer in query frown

Venus78 #220947 03/05/10 05:02 PM
Joined: Mar 2010
Posts: 17
V
Venus78 Offline OP
Pikka bird
OP Offline
Pikka bird
V
Joined: Mar 2010
Posts: 17
chacha
frown

Venus78 #220950 03/05/10 08:14 PM
Joined: Feb 2009
Posts: 133
C
Vogon poet
Offline
Vogon poet
C
Joined: Feb 2009
Posts: 133
sorry i didnt test the code before

Code:
on @!*:join:#:{
  msg $nick hi $nick $+ , you have 10 sec. to avoid kick answer by: test ok
  set %test_ok $+ $nick 1
  timertestok 1 10 kbanned $nick #
}
on *:text:*:?:{
  if ($($+(%,test_ok,$nick),2)) && ($strip($1-2) == test ok) {
    unset %test_ok $+ $nick
    msg $nick welcome $nick :) you can stay
    close -m $nick
  }
}
alias kbanned if ($($+(%,test_ok,$1),2)) ban -ku600 $2 $1 2 no answer


WorldDMT
chacha #221022 05/05/10 01:58 PM
Joined: Mar 2010
Posts: 17
V
Venus78 Offline OP
Pikka bird
OP Offline
Pikka bird
V
Joined: Mar 2010
Posts: 17
chacha

how to made ban level 4

ban -ku600 $2 $1 2 no answer

Venus78 #221023 05/05/10 02:13 PM
Joined: Jul 2006
Posts: 4,150
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,150
2 is the type, just use 4

ban -ku600 $2 $1 4 no answer


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Wims #221086 07/05/10 09:01 AM
Joined: Mar 2010
Posts: 17
V
Venus78 Offline OP
Pikka bird
OP Offline
Pikka bird
V
Joined: Mar 2010
Posts: 17
help me this code not working

on *:RAWMODE:#:{
if (+b iswm $1) {
.timer 1 300 /mode # -b $2
}
}
[code][/code]

Last edited by Venus78; 07/05/10 09:06 AM.
Venus78 #221087 07/05/10 09:10 AM
Joined: Mar 2010
Posts: 17
V
Venus78 Offline OP
Pikka bird
OP Offline
Pikka bird
V
Joined: Mar 2010
Posts: 17
actually i'm server admin i need this code work when i'm not opped

Venus78 #221097 07/05/10 04:28 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Remove the @ on the event line.


Invision Support
#Invision on irc.irchighway.net
Venus78 #221134 08/05/10 07:20 AM
Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
Originally Posted By: Venus78
help me this code not working
on *:RAWMODE:#:{
if (+b iswm $1) {
.timer 1 300 /mode # -b $2
}
}

Try this:
Code:
on *:rawmode:#: {
  var %b = 1
  while ($mode(%b).ban) {
    .timer 1 300 mode # -b $ifmatch
    inc %b
  }
}

Tomao #221138 08/05/10 11:09 AM
Joined: Mar 2010
Posts: 17
V
Venus78 Offline OP
Pikka bird
OP Offline
Pikka bird
V
Joined: Mar 2010
Posts: 17
on *:text:*:?:{ <----can this code made 1 channel only if can u guys teach me or made for me frown


Venus78 #221144 08/05/10 04:33 PM
Joined: Apr 2010
Posts: 969
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 969
it can but can't. You would have to check to see if ($nick isin #channelname) {

Last edited by FroggieDaFrog; 08/05/10 08:50 PM.

I am SReject
My Stuff
Venus78 #221145 08/05/10 05:31 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Just put your channel name in: on @!*:join:#:{

e.g. on @!*:join:#mychan:{

It doesn't need to be in the on text event with what you're doing.


Invision Support
#Invision on irc.irchighway.net
Venus78 #221152 08/05/10 10:17 PM
Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
Originally Posted By: Venus78
on *:text:*:?:{ <----can this code made 1 channel
Since there's no $chan in the private event, you may need to do this:
Code:
on *:text:*:?: {
  if ($nick ison #YOURCHANNEL) { 
  ;rest of code here
Replace #YOURCHANNEL with the one you want this script to work on. I would assume this is for PM conversation. The $nick being the person who talks to your in your query window.

Tomao #221156 08/05/10 11:24 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Check out the script being used. Only the on join needs a channel.


Invision Support
#Invision on irc.irchighway.net
Riamus2 #221160 09/05/10 12:10 AM
Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
Right my mistake. I thought venus78 asked that as a separate matter.

Tomao #221201 10/05/10 11:48 AM
Joined: Mar 2010
Posts: 17
V
Venus78 Offline OP
Pikka bird
OP Offline
Pikka bird
V
Joined: Mar 2010
Posts: 17
claim down dun fight sorry i'm newbie n thanks all for helpping me out and thanks for consern

Venus78 #221202 10/05/10 11:50 AM
Joined: Mar 2010
Posts: 17
V
Venus78 Offline OP
Pikka bird
OP Offline
Pikka bird
V
Joined: Mar 2010
Posts: 17
ok need the last help anyone have code for idle kicked in room #help,if the user idle more then 7 minute will kick them out

Venus78 #221205 10/05/10 01:09 PM
Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
(untested scribble)
Code:
; start offline timer to trigger "removeidlers"-alias every 30s
on *:start: .timerremoveidlers 0 30 removeidlers
on *:unload: .timerremoveidlers off

alias removeidlers {

  ; ######## SETUP START ########
  ; channels (separated by comma) 
  var %chans = #help,#anotherchannel
  ; max. idle duration (in seconds) 
  var %limit = 420
  ; kick delay (in milliseconds) 
  var %delay = 500
  ; ######## SETUP END ########

  ; create a clean temp file
  var %f = removeidlers.txt
  write -c $qt(%f)
  ; loop channels
  var %c = 1
  while ($gettok(%chans,%c,44)) {
    ; able to kick
    if ($me isop $v1) {
      ; loop users of that chan
      var %chan = $v2, %n = 1
      while ($nick(%chan,%n,r)) {
        var %nick = $v1
        ; if idle of that user exceeds idle limit: write kick command to temp file
        if ($nick(%chan,$v1).idle > %limit) { write $qt(%f) kick %chan %nick Please don't idle in %chan }
        inc %n
      }
    }
    inc %c
  }
  ; any lines in temp file
  if ($lines(%f)) { 
    ; play commands with specified delay to status window and remove tempfile
    .play -pcs $qt(%f) %delay 
    .remove $qt(%f)
  }
}
Note that it's set to kick "regular" idle users only

Last edited by Horstl; 10/05/10 01:16 PM.
Horstl #221900 31/05/10 01:36 PM
Joined: Mar 2010
Posts: 17
V
Venus78 Offline OP
Pikka bird
OP Offline
Pikka bird
V
Joined: Mar 2010
Posts: 17
[code][/code]
on *:TEXT:*:#: {
if (% $+ k == $strip($1-)) {
.raw kick # $nick Auto-kick for do to smart 4 kick number %kickss ) | mode # +b $mask($fulladdress,13) | .timer 1 120 mode # -b $mask($fulladdress,13)
return
}
if (% $+ c == $strip($1-)) {
set % $+ c
}
elseif (% $+ u == $strip($1-)) {
set % $+ u
}
else {
set % $+ f
timer 1 12 /unset % $+ $nick
}
}

can help me by this,when ppl typing like this got kick

f
u
c
k

Venus78 #221902 31/05/10 02:23 PM
Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
You're comparing the message to variable names for a literal match, and you unset some variable %NICK that never had been set... Try this:
Code:
; text event triggering if you're op in that channel and stripped message is a single letter (A-z)
on $@*:text:/^[a-z]$/Si:#: {
  ; "item" = <server connection ID>.<channel name>.<nick>
  var %i = $+($cid,.,$chan,.,$nick)
  ; increase value of "item" in hash table "letterspam" (item auto-unsets after 30 seconds)
  hinc -mu30 letterspam %i 

  ; value of "item" is above 3 (4 or more letters had been spammed)
  if ($hget(letterspam,%i) > 3) {
    ; remove "item" from hash table "letterspam"
    hdel letterspam %i

    ; YOUR ACTION GOES HERE
    kick $chan $nick Don't spam single letters!

  }
}
Note that there are many ways to elude that script:
f! u! c! k!
-f- -u- -c- -k-
FFF UUU CCC KKK
...and so on. While one could extend the script, it would increase the risk of "false positives" at the same time. And there's always another spamming method you couldn't have thought of in advance.
No script can make up for real ops' eyes and brains. wink

Last edited by Horstl; 31/05/10 02:28 PM.
Riamus2 #223070 13/07/10 06:06 PM
Joined: Mar 2010
Posts: 17
V
Venus78 Offline OP
Pikka bird
OP Offline
Pikka bird
V
Joined: Mar 2010
Posts: 17
i really need with code request kick if user are idling in UNO room coz when they ilde ppl got to wait the idler user to play the,so need when ppl typing !idle nick if that nick idle for 1 minute the bot will kick just only in UNO room


on *:TEXT:*!idle*:*: {
if ($1 = !idle) && (%idle.time.get = $null) {
raw whois $2 $2
set %idle.time.get on
set %idle.chan $chan
set %idle.nick $2
}
elseif ($1 = !idle) && (%idle.time.get != $null) {
msg $chan There is currently already an !idle check in progress $nick $+ , please try again in a second!
}
}
raw 317:*:{
if (%idle.time.get = on) {
set %temp.idle.time $3
msg %idle.chan %idle.nick has been idle for $duration(%temp.idle.time)
unset %temp.idle.time
unset %idle.nick
unset %idle.chan
unset %idle.time.get
halt
}
}
[code][/code]

Venus78 #223111 14/07/10 05:05 PM
Joined: Mar 2010
Posts: 17
V
Venus78 Offline OP
Pikka bird
OP Offline
Pikka bird
V
Joined: Mar 2010
Posts: 17
help me the kick not working

on *:TEXT:!idle*:#uno: {
if ($2 == $null) {
/msg $chan you must supply a nickname and optionally a channel.
}
else {
if ($3 == $null) {
if ($2 ison $chan) {
/msg $chan $2 has been idle on $chan for $getnickidle($2,$chan) $+ .
}
else {
/msg $chan $2 is not on $chan $+ .
}
}
elseif ($me ison $3) {
if ($2 ison $3) {
/msg $chan $2 has been idle on $3 for $getnickidle($2,$3) $+ .
}
else {
/msg $chan $2 is not on $3
}
}
else {
/msg $chan I am not on $3 $+ .
}
}
else {
if ($nick($chan,$1).idle > %idletime) { kick $chan $2 You have been idle too long!
}
}
}

alias getnickidle {
/var %x 0
:getnickidleloop
/inc %x
if (%x == $nick($2,$1)) {
/return $duration($nick($2,%x).idle)
}
else {
if (%x < $nick($2,$1)) {
goto getnickidleloop
}
else {
return error
}
}
}

Venus78 #223122 14/07/10 07:21 PM
Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
You don't need to loop for the N of <nick> on <chan> like in the getnickidle-alias to get $nick($chan,N).idle. You can do without that loop (and thus without that alias) by using $nick($chan,$nick).idle right away smile
Regarding the kick issue, you put "($nick($chan,$1).idle > %idletime) " which should be ($nick($chan,$2).idle > %idletime)

Below's but a suggestion:
- added the 60s %limit local variable on top, just in case you don't set some global variable elsewhere. If you want to use "%idletime", just rename %limit to %idletime
- merged some conditions
- moved the kick-command (it will now either msg or kick)
- put #$3 in place of $3 in case of an omitted channel prefix
- added the case #$3 == $chan
Code:
on *:TEXT:!idle*:#uno: {
  var %limit = 60
  if (!$2) { msg $chan you must supply a nickname and optionally a channel. }
  else {
    if ((!$3) || (#$3 == $chan)) {
      if ($2 ison $chan) {
        var %idle = $nick($chan,$2).idle
        if (($me isop $chan) && ($2 != $me) && (%idle > %limit)) { kick $chan $2 You have been idle too long! ( $+ $duration(%idle) - limit is $duration(%limit) $+ ) }
        else { msg $chan $2 has been idle on $chan for $duration(%idle) $+ . }
      }
      else { msg $chan $2 is not on $chan $+ . }
    }
    elseif ($me ison #$3) {
      if ($2 ison #$3) { msg $chan $2 has been idle on #$3 for $duration($nick(#$3,$2).idle) $+ . }
      else { msg $chan $2 is not on #$3 $+ . }
    }
    else { msg $chan I am not on #$3 $+ . }
  }
}


P.S. Try to wrap pasted code with the [code][/code] tags wink

Page 1 of 2 1 2

Link Copied to Clipboard