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 

script to capture ip addresses and return with command

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


Joined: 03 Oct 2010
Posts: 1

PostPosted: Sun Oct 03, 2010 11:53 pm    Post subject: script to capture ip addresses and return with command Reply with quote

I have this script in .mrc language

Code:
on *:TEXT:*189.*:#: {
  set %ipset $1-
  set %ipnick $nick
  set %iptime $time
}
on *:TEXT:*200.*:#: {
  set %ipset $1-
  set %ipnick $nick
  set %iptime $time
}
on *:TEXT:*201.*:#: {
  set %ipset $1-
  set %ipnick $nick
  set %iptime $time
}
on *:TEXT:*187.*:#: {
  set %ipset $1-
  set %ipnick $nick
  set %iptime $time
}
on *:TEXT:!mix:#: {
  set %timer $remove($time,:)
  if %timer > 235959 {
    set %timer $calc(%timer - 235959)
  }
  if $calc(%timer2 - %timer) > 15 {
    set %timer2 000000
  }
  if %timer > %timer2 {
    set %timer2 $calc(%timer + 15)
    if %timer2 > 235959 {
      set %timer2 $calc(%timer2 - 235959)
    }
    /msg $chan 7,1Ultimo mix enviado: %ipset   1,8[ 5Enviado por10,8 %ipnick 5,8ās10,8 %iptime 1,8]
  }
  else {
    set %left $calc(%timer2 - (%timer + 1))
    /notice $nick O canal $chan limita o uso do comando !mix. Aguarde %left segundo(s) para poder usa-lo. 
  }
}


the objective of this script is capture the last message with containing some ip address and return the ip address when someone say !mix (public command), the command !mix can be used only once every 15 seconds, otherwise returns a message informing how much time remains to complete 15 seconds

would look like in tcl?
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