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 

GLine

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
Madalin
Master


Joined: 24 Jun 2005
Posts: 300
Location: Constanta, Romania

PostPosted: Sat Jun 29, 2013 2:44 pm    Post subject: GLine Reply with quote

For any questions or bugs please post here.

Code:
#### ++++ Author: MadaliN <madalinmen28@yahoo.com>
### +++ Website: www.Ascenture.ro
## +++ TCL Name: GLine
# +++ Version: 1.0
## ++++
# Commands:
#   !gline 45.432.12.1
#
# For the command to work you need to have VOICE or OP in the main channel
#

bind PUBM - * gline:main

set temp(trigger) {! . `}

proc gline:main {nick uhost hand chan arg} {
   global temp

   if {[string index $arg 0] in $temp(trigger)} {
      set temp(cmd) [string range $arg 1 end]
      set temp(cmd) [lindex [split $temp(cmd)] 0]
      set arg [join [lrange [split $arg] 1 end]]
   } elseif {[isbotnick [lindex [split $arg] 0]]} {
      set temp(cmd) [lindex [split $arg] 1]
      set arg [join [lrange [split $arg] 2 end]]
   } else { return 0 }

   if {[info commands command:$temp(cmd)] != ""} { command:$temp(cmd) $nick $uhost $hand $chan $arg }
}

proc command:gline {nick uhost hand chan arg} {
   global top temp

   if {[isvoice $nick $chan] || [isop $nick $chan]} {

      set ip [lindex [split $arg] 0]

      if {![regexp {^(?:(?:[01]?\d?\d|2[0-4]\d|25[0-5])(\.|$)){4}$} $ip]} { putserv "PRIVMSG $chan :\002$nick\002 -  NO/Invalid IP pattern. USAGE: !gline 193.193.193.193"; return }

      set temp(gchan) $chan
      set temp(gnick) $nick

      putquick "GLINE $ip"
      bind raw - 280 gline:valid
      bind raw - 512 gline:invalid
   }
}

proc gline:valid {from cmd arg} {
   global temp

   set glineI [lindex [split $arg] 1]
   set glineT [lindex [split $arg] 4]
   set glineE [lindex [split $arg] 3]
   set glineR [join [lrange [split $arg] 7 end]]

   putserv "PRIVMSG $temp(gchan) :\002$temp(gnick)\002 - GLine for \00304$glineI\003 was created on \00312[clock format $glineE]\003 meaning \00303[duration [expr $glineT - $glineE]]\003 and it will expire on \00312[clock format $glineT]\003 meaning \00303[duration [expr $glineT - [clock seconds]]]\003. Reason: \00306$glineR"

   catch {unbind RAW - 280 gline:valid}
   catch {unbind RAW - 512 gline:invalid}
}

proc gline:invalid {from cmd arg} {
   global temp

   putserv "PRIVMSG $temp(gchan) :\002$temp(gnick)\002 - There is not GLine for that IP"

   catch {unbind RAW - 280 gline:valid}
   catch {unbind RAW - 512 gline:invalid}
}

putlog "++ Succesfully loaded: \00312GLine"

_________________
https://github.com/MadaliNTCL - To chat with me: https://tawk.to/MadaliNTCL
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
d3n
Voice


Joined: 13 Jul 2016
Posts: 15
Location: Italy

PostPosted: Sat Nov 26, 2016 7:16 am    Post subject: Doesn't work Reply with quote

I load this script in my eggdrop, and doesn't work for me... i changed this line and for now work

putquick "GLINE $ip" changed putquick "GLINE *@$ip 3d Abused"

but the problem is don't say in the chan the results..
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 Support & Releases 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