mIRC log review for bot.
 
Post new topic   Reply to topic    Hawkee.com Forum Index -> mIRC Snippet Requests
 
beeper  -  Thu Jun 14, 2012 12:14 pm Reply with quote
I'll make this simple I'm looking for a script that will allow me to search the mIRC log files via the bot using a command like "!log <searchword>" and will display to chat, (one) line of text from any irc logs with that string.
Jethro  -  Thu Jun 14, 2012 1:52 pm Reply with quote
Use:

Code

 
beeper  -  Thu Jun 14, 2012 4:52 pm Reply with quote

Code

 


Something like this or do I need to define somehow all of the logfiles in $read(logfile,nw,%keyword)? There is a lot of files.
beeper  -  Thu Jun 14, 2012 4:56 pm Reply with quote

Code

 
beeper  -  Thu Jun 14, 2012 5:01 pm Reply with quote

Code

 


Maybe this looks a little better.
KilllerX  -  Fri Jun 15, 2012 2:18 am Reply with quote
@beeper just so you know another way to do

if ($2 == $null)

is just

if (!$2)

the ! in coding usually signifies that the next string isn't provided, or isn't there.

Code

 


to me looks neater and is fairly easier. skips unnecessary checks. by unnecessary, I mean the ($nick isop #) check, as it first checks if they aren't op, then it looks at if they are, and if $2 isn't provided, then it checks if it is.


By the way, if you want to search for a string of text use $2- instead of $2
Jethro  -  Fri Jun 15, 2012 2:28 am Reply with quote
killerx, I'll suggest that you use the if-elseif-else, respectively, rather than insert a redundant else statement after the first if condition:

Code

 
you can unset as many variable values as you want horizontally, so you don't have to place another instance.
Lenooox  -  Fri Jun 15, 2012 12:55 pm Reply with quote
I'm looking at this snippet, but I get error

* /msg: insufficient parameters (line 11, script1.mrc)
line 11 is : msg # %found
MoMy  -  Fri Jun 15, 2012 1:20 pm Reply with quote
there must be a file ''logfile'' otherwise $read does not find anything and %found = $null.
I think I need a control, both on the file exists and the existence of $2 in the file.
Display posts from previous:   
Post new topic   Reply to topic    Hawkee.com Forum Index -> mIRC Snippet Requests All times are GMT - 7 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
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.