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 

timed unban not working

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
heartbroken
Op


Joined: 23 Jun 2011
Posts: 106
Location: somewhere out there

PostPosted: Sun Jul 24, 2011 5:28 am    Post subject: timed unban not working Reply with quote

hi Smile

i found a code and i edit somethings. but it has some problems like this code should be remove ban of user in a timed period. i set ban for chan-ignore and its been working nicely but when time comes for remove it that mode is not working..i tried different type of timing sets for remove that mode when timer finished but nope..

and i wanna ask you something how can we set user-nick in msg part i tried like : hi $nick welcome etc.. but $nick shows botnick Razz

need your help ..thank you..
Code:

#########################################################################

set canales "#muy-chan"

set badidents {
"1020*"
"1030*"
"1040*"
"2050*"
"1042*"
"1031*"
}

########################################################

set tiempoban 15

set noflagban "fmo|omf"

set mensaje "my first msg"
set mensaje1 "this is my second one*"
set mensaje2 "i'm still talking"

##########################################################
bind join - * join:bbadident

proc join:bbadident {nick host hand chan} {
 global botnick badidents canales noflagban tiempoban mensaje mensaje1 mensaje2
  if {(([lsearch -exact [string tolower $canales] [string tolower $chan]] != -1) || ($canales== "*")) && ($nick != $botnick)} {
    foreach bbadident [string tolower $badidents] {
     set badidban "*!*$bbadident*@*"
     set userident "[string trimleft [string tolower [lindex [split $host "@"] 0]] "~"]"
    if {[string match *$bbadident* [string tolower $userident]]} {
      if {([botisop $chan]) && (![isop $nick $chan]) && (![isvoice $nick $chan]) && (![matchattr $hand $noflagban $chan]) && ([onchan $nick $chan])} {
     putquick "MODE $chan +b ~q:$badidban"
     putserv "NOTICE $nick :$mensaje"
     putserv "NOTICE $nick :$mensaje1"
          putserv "NOTICE $nick :$mensaje2"
        timer $tiempoban "pushmode $chan -b ~q:$badidban"
        return 0
        }
      }
    }
  }
}

putlog "-= Loaded: BadIdban.tcl By Chino_^ =-"

return



_________________
Life iS Just a dReaM oN tHE wAy to DeaTh
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help 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