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 

Need Small Script To Save Connecting Nicks On Server

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


Joined: 26 Jun 2012
Posts: 49
Location: root@localhost

PostPosted: Sat Aug 04, 2012 4:59 am    Post subject: Need Small Script To Save Connecting Nicks On Server Reply with quote

Hello I Need A Small Script..
Client Connecting On My Server And The Format Is:
irc.server.com- *** Notice -- Client connecting on port 6667: Abc (~ABC@69.42.218.545) [clients]

I Need The Bot Save This Line To A File: irc.server.com- *** Notice -- Client connecting on port 6667: Abc (~ABC@69.42.218.545) [clients]

In Logs.txt Is It Possible?
Back to top
View user's profile Send private message Visit poster's website
SpiKe^^
Owner


Joined: 12 May 2006
Posts: 792
Location: Tennessee, USA

PostPosted: Tue Jan 22, 2013 10:20 am    Post subject: Reply with quote

Believe that's the rough idea, see if it logs anything, and if it needs more work:)

Code:

# set full route and filename ##
set the_log_file "/usr/home/spike/connect.log"

# set mask(s) to match for lines to save to the log ##
# note: put each mask on it's own line. ##
set the_notc_masks {
*Client connecting*
}

############# end settings #############

set the_notc_masks [split [string trim $the_notc_masks] \n]

bind raw - NOTICE notc:log:proc

proc notc:log:proc {from keyword text} {

  foreach mask $::the_notc_masks {

    if {[string match -nocase $mask $text]} {
      set open [open $::the_log_file a]
      puts $open $text
      close $open
      break
    }

  }
  return 0
}


_________________
SpiKe^^

Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
.
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