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 

somebody can help me please ?

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
KiMoW
Voice


Joined: 18 Jan 2010
Posts: 6

PostPosted: Mon Jan 18, 2010 4:26 am    Post subject: somebody can help me please ? Reply with quote

bind mode - "*+b" Rem_ban


proc Rem_Ban { nick host hand chan mode target } {
if {$nick != Lea} {
set banmask $target
timer 30 [list putquick "MODE $chan -b $target" ]
}
}


the base is that if one user ban someone the eggdrop will remove the ban after 30 min
_________________
http://www.open-serv.net/
Back to top
View user's profile Send private message Visit poster's website
TCL_no_TK
Owner


Joined: 25 Aug 2006
Posts: 509
Location: England, Yorkshire

PostPosted: Mon Jan 18, 2010 8:36 am    Post subject: Reply with quote

Code:
 { nick host hand chan mode target }
$nick = The Operator that done the mode change (in this case the ban).

I should mention that eggdrop already has a alot settings that control when it removes bans and how long they last on the channel. You can change/set this via the config file (global) or via DCC/Telnet command chanset

Example: (setting all channel bans to be removed after 30mins on my channel #test, i would issue the following command in DCC/Telnet)

.chanset #test ban-time 30

Smile
_________________
TCL the misunderstood
Back to top
View user's profile Send private message Send e-mail
KiMoW
Voice


Joined: 18 Jan 2010
Posts: 6

PostPosted: Mon Jan 18, 2010 3:02 pm    Post subject: Reply with quote

i know i already tried but without results so i'm triying to do it at a tcl code that i will put at the eggdrop
_________________
http://www.open-serv.net/
Back to top
View user's profile Send private message Visit poster's website
Nor7on
Op


Joined: 03 Mar 2007
Posts: 185
Location: Spain - Barcelona

PostPosted: Mon Jan 18, 2010 3:26 pm    Post subject: Reply with quote

Maybe try:

Code:
.chanset #test -enforcebans +dynamicbans
.chanset #test ban-time 30
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
KiMoW
Voice


Joined: 18 Jan 2010
Posts: 6

PostPosted: Mon Jan 18, 2010 3:27 pm    Post subject: Reply with quote

yup i know but no results
_________________
http://www.open-serv.net/
Back to top
View user's profile Send private message Visit poster's website
Nor7on
Op


Joined: 03 Mar 2007
Posts: 185
Location: Spain - Barcelona

PostPosted: Mon Jan 18, 2010 3:39 pm    Post subject: Reply with quote

and...

Code:
global-ban-time 30


or put:

Code:
.chaninfo #yourchan


and paste here your results.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
blake
Master


Joined: 23 Feb 2009
Posts: 201

PostPosted: Mon Jan 18, 2010 5:26 pm    Post subject: Reply with quote

TCL_no_TK wrote this a few weeks back for me allows for the bot to set +b usernick and kick will remove ban after set amount of minutes

Code:
bind msg ho|ho bankick cmd:bankick
proc cmd:bankick {nick host hand text} {
  set chan [lindex [split $text] 0]
  set user [lindex [split $text] 1]
  set why [join [lrange [split $text] 2 end-1]]
  set chk [join [lrange [split $text] end end]]
  if {![regexp -- {^[0-9]} $chk]} {set why [join [lrange [split $text] 2 end]]} else {set bantime [join [lrange [split $text] end end]]}
   if {[info exists bantime]} {
    putserv "MODE $chan +b $user"
    putserv "PRIVMSG ChanServ KICK $chan $user $why) (Issued By $nick"
    timer $bantime [list putserv "MODE $chan -b $user"]
    return 1
   } else {
    putserv "MODE $chan +b $user"
    putserv "PRIVMSG ChanServ KICK $chan $user $why) (Issued By $nick"
    return 1
   }
 }



works via private msg /msg botnick bankick chan nick reason time
_________________
Blake
UKEasyHosting UKStormWatch
Back to top
View user's profile Send private message Visit poster's website
KiMoW
Voice


Joined: 18 Jan 2010
Posts: 6

PostPosted: Mon Jan 18, 2010 8:38 pm    Post subject: Reply with quote

when i do the chan info i have that the ban time is setted to 30 min but when i ban it doesn't remove it.

Blake i don't wanna put the +b i wanna remove it
_________________
http://www.open-serv.net/
Back to top
View user's profile Send private message Visit poster's website
TCL_no_TK
Owner


Joined: 25 Aug 2006
Posts: 509
Location: England, Yorkshire

PostPosted: Tue Jan 19, 2010 3:10 am    Post subject: Reply with quote

*sign*
Code:
# forces any ban set on the channel to be removed in 30mins regardless of any channel settings
 proc mode:force_unban {nick uhost hand chan mode {target ""}} {
  global botnick
   if {$target == ""} {
    set target "$botnick"
   }
    # ignore unrealircd's "channel" and "GEOS (realname)" bans
    if {![regexp {^~(c|r)} $target]} {
     timer 30 [list pushmode $chan -b $target]
     return
    }
 }

 bind mode -|- "*+b*" mode:force_unban

_________________
TCL the misunderstood
Back to top
View user's profile Send private message Send e-mail
KiMoW
Voice


Joined: 18 Jan 2010
Posts: 6

PostPosted: Tue Jan 19, 2010 6:31 pm    Post subject: Reply with quote

Code:
proc mode:force_unban {nick uhost hand chan mode {target ""}} {
  global botnick
  if {$nick == Lea} {return}
  else {
  if {$target == ""} {
    set target "$botnick"
   }
    if {![regexp {^~(c|r)} $target]} {
     timer 30 [list pushmode $chan -b $target]
     return
    }
 }
}
 
bind mode -|- "*+b*" mode:force_unban



why doesn't it work ?[/code]
_________________
http://www.open-serv.net/
Back to top
View user's profile Send private message Visit poster's website
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Tue Jan 19, 2010 7:00 pm    Post subject: Reply with quote

First off, there's no command named 'else'. That added with tcl's behavior to terminate commands on newline makes the following break:
Code:
  if {$nick == Lea} {return}
  else {

'Else' should be another parameter for 'if', so it needs to be on the same line:
Code:
if {$nick == Lea} {
  return
} else {


Next, try adding some putlog's in there for debugging:
Code:
proc mode:force_unban {nick uhost hand chan mode {target ""}} {
 global botnick
 putlog "Ban detected: Nick: $nick ($uhost) Handle: $hand Channel: $chan Mode: $mode ($target)"
 if {$nick == Lea} {
  putlog "nickname is Lea, aborting"
  return
 } else {
  if {$target == ""} {
   set target "$botnick"
  }
  putlog "Running regular expression..."
  if {![regexp {^~(c|r)} $target]} {
   putlog "No match!, starting timer..."
   set timer [timer 30 [list pushmode $chan -b $target]]
   putlog "Timer $timer started!"
   return
  }
 }
 putlog "end of proc"
}
 
bind mode -|- "*+b*" mode:force_unban


That should let you see what is going on behind the scenes..
_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
KiMoW
Voice


Joined: 18 Jan 2010
Posts: 6

PostPosted: Tue Jan 19, 2010 7:09 pm    Post subject: Reply with quote

yup :p thank you
_________________
http://www.open-serv.net/
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests 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