egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

aidle and Unreal

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive
View previous topic :: View next topic  
Author Message
byte
Voice


Joined: 23 Jul 2005
Posts: 9

PostPosted: Sun Aug 28, 2005 9:12 am    Post subject: aidle and Unreal Reply with quote

hello, i use this anti idle script for my chan , and exclude op, halfop and voice but the tcl don't detect founder ~ and sop & and kickban this, 1 solution ?

Code:

### GLOBALS ###
set exclude(op) 1
set exclude(halfop) 1
set exclude(voice) 1

set ban(type) 3
set ban(time) 10
set ban(reason) "Ban temporaneo di %BAN minuti"

set notice(msg) "Vietato sostare su %CHAN per pił di %IDLE minuti"
### END GLOBALS ###

### FLAGS ###
setudef int max_idle
### END FLAGS###

### BINDS ###
bind time - "* * * * *" idle:check
### END BINDS ###

### PROCS ###
proc idle:check { hour min day month year } {
   foreach chan [ channels ] {
      idle:scan ${chan}
   }
}

proc idle:scan { chan } {
   set max [ channel get ${chan} max_idle ]
   if { ${max} > 0 } {
      foreach nick [ chanlist ${chan} ] {
         if { [ isop ${nick} ${chan} ] && $::exclude(op) != 0 } {
            continue
         }
         if { [ ishalfop ${nick} ${chan} ] && $::exclude(halfop) != 0 } {
            continue
         }
         if { [ isvoice ${nick} ${chan} ] && $::exclude(voice) != 0 } {
            continue
         }

         if { [ getchanidle ${nick} ${chan} ] >= ${max} } {
            set kickmsg [ var:replace $::ban(reason) "%BAN" "$::ban(time)" ]
            set noticemsg [ var:replace [ var:replace $::notice(msg) "%CHAN" "${chan}" ] "%IDLE" "${max}" ]
            set mask [ address "${nick}![ getchanhost ${nick} ${chan} ]" $::ban(type) ]

            if { [ isop ${nick} ${chan} ] } {
               putquick "MODE ${chan} -o+b ${nick} ${mask}"
            } elseif { [ ishalfop ${nick} ${chan} ] } {
               putquick "MODE ${chan} -h+b ${nick} ${mask}"
            } else {
               putquick "MODE ${chan} +b ${mask}"
            }

            if { ${kickmsg} != "" } {
               putquick "KICK ${chan} ${nick} :${kickmsg}"
            } else {
               putquick "KICK ${chan} ${nick} :Ban temporaneo di ${max} minuti"
            }

            if { ${noticemsg} != "" } {
               putquick "NOTICE ${nick} :${noticemsg}"
            }

            timer $::ban(time) "ban:remove ${chan} ${mask}"
         }
      }
   }
}

proc ban:remove { chan mask } {
   putquick "MODE ${chan} -b ${mask}"
}

proc var:replace { line var value } {
   regsub -- "$var" $line "$value" line
   return $line
}

proc address { mask type } {
   set nick [ lindex [ split ${mask} "!" ] 0 ]
   set ident [ lindex [ split [ lindex [ split ${mask} "!" ] 1 ] "@" ] 0 ]
   set host [ lindex [ split ${mask} "@" ] 1 ]
   set domain [ lindex [ split [ maskhost ${mask} ] "@" ] 1 ]
   switch  -- ${type} {
      0 { return "*!${ident}@${host}" }
      1 { return "*!*${ident}@${host}" }
      2 { return "*!*@${host}" }
      3 { return "*!*${ident}@${domain}" }
      4 { return "*!*@${domain}" }
      5 { return "${nick}!${ident}@${host}" }
      6 { return "${nick}!*${ident}@${host}" }
      7 { return "${nick}!*@${host}" }
      8 { return "${nick}!*${ident}@${domain}" }
      9 { return "${nick}!*@${domain}" }
   }
}
### END PROCS ###

### INITIAL ###
if { $ban(time) < 1} {
   set ban(time) 10
}
if { $ban(type) < 0 || $ban(type) > 9 } {
   set ban(type) 2
}
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sun Aug 28, 2005 12:02 pm    Post subject: Reply with quote

In your .conf file
Quote:
set opchars "@&~"

_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
byte
Voice


Joined: 23 Jul 2005
Posts: 9

PostPosted: Sun Aug 28, 2005 12:26 pm    Post subject: Reply with quote

yes, i add set opchars "@&~" but i have the same problem Confused
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber