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 

little help again lock chan

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


Joined: 11 Feb 2006
Posts: 55

PostPosted: Tue Feb 21, 2006 7:26 am    Post subject: little help again lock chan Reply with quote

i have edited the partquit.tcl so that it would ban thru X... can nyone help me how to make it lock the chan for 60 secs

Code:
  if {($partquitpunish == 1)} { putserv "PRIVMSG X :ban $chan  *!*@[lindex [split $uhost @] 1] $partquitkickmsg"; return 0 }
  if {($partquitpunish == 2)} { putserv "PRIVMSG X :ban $chan  *!*@[lindex [split $uhost @] 1] $partquitkickmsg"; return 0 }
  if {($partquitpunish == 3)} { putserv "PRIVMSG X :ban $chan  *!*@[lindex [split $uhost @] 1] $partquitkickmsg"; return 0 }


how do i put these lines.. hav no idea can anyone help me ??
putquick "MODE $chan +mr" -next
utimer 60 [list putquick "MODE $chan -mr" -next] [/code]
Back to top
View user's profile Send private message Visit poster's website
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Tue Feb 21, 2006 8:23 pm    Post subject: Reply with quote

Code:
set lock_modes "mr"

utimer 60 [list chan:unlock $chan]

##
# unlock
proc chan:unlock {chan} {
  set tmp [split [string trim [lindex [split [getchanmode $chan]] 0] "+"] ""]
  if {[regexp -all [join [split $::lock_modes ""] "|"] $tmp] == [string length $::lock_modes]} {
    putquick "MODE $chan -$::lock_modes" -next
  }
  return
}

### End ###

_________________
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Back to top
View user's profile Send private message Visit poster's website
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Tue Feb 21, 2006 11:40 pm    Post subject: Reply with quote

Alchera wrote:
Code:
set lock_modes "mr"

utimer 60 [list chan:unlock $chan]

##
# unlock
proc chan:unlock {chan} {
  set tmp [split [string trim [lindex [split [getchanmode $chan]] 0] "+"] ""]
  if {[regexp -all [join [split $::lock_modes ""] "|"] $tmp] == [string length $::lock_modes]} {
    putquick "MODE $chan -$::lock_modes" -next
  }
  return
}

### End ###

applying in Annual Obfuscated Tcl Code Contest? Wink
_________________
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code
Back to top
View user's profile Send private message Visit poster's website
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Wed Feb 22, 2006 12:04 am    Post subject: Reply with quote

Might do. Laughing
_________________
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Back to top
View user's profile Send private message Visit poster's website
silverboy
Halfop


Joined: 11 Feb 2006
Posts: 55

PostPosted: Thu Feb 23, 2006 6:11 am    Post subject: Reply with quote

I have put it like this but it doesnt work lol


Code:
proc partquit:ban {nick chan uhost} {
 global botnick partquitkick partquitkickmsg partquitpunish partquitbanmask partquitbantime
  set banmask [partquit:banmask:type $nick!$uhost $partquitbanmask]
  if {($partquitbantime == 0) || ($partquitbantime < 1) || ($partquitbantime == "")} { set partquitbantime 60 }
  if {($partquitkick == 2) && ($partquitkickmsg == "")} { set partquitkickmsg "" }
  if {($partquitkick == 1)} { set partquitkickmsg "0,1Part/Quit Flood1,0 - 2Unwanted characters ,2specific words, control codes 2long messages" }
  if {($partquitpunish == 1)} { putserv "PRIVMSG X :ban $chan  *!*@[lindex [split $uhost @] 1] $partquitkickmsg"; return 0 }
  if {($partquitpunish == 2)} { putserv "PRIVMSG X :ban $chan  *!*@[lindex [split $uhost @] 1] $partquitkickmsg"; return 0 }
  if {($partquitpunish == 3)} { putserv "PRIVMSG X :ban $chan  *!*@[lindex [split $uhost @] 1] $partquitkickmsg"; return 0 }

set lock_modes "mr"

utimer 60 [list chan:unlock $chan]

##
# unlock
proc chan:unlock {chan} {
  set tmp [split [string trim [lindex [split [getchanmode $chan]] 0] "+"] ""]
  if {[regexp -all [join [split $::lock_modes ""] "|"] $tmp] == [string length $::lock_modes]} {
    putquick "MODE $chan -$::lock_modes" -next
  }
  return
}
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 -> 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