Last X Lines v2.0

By ch1zra on Jun 13, 2006

Snippet that simply repeats last X lines (the name is quite self explanatory, isn't it ?) of conversation in active window/to target.

Usage : /last [X] [target]
[X] represents number of lines that you want to repeat.

[target] (optional) if you enter target, then last X lines from active window will be sent to [target]. If not, they will be repeated to $active window.

Comments

Sign in to comment.
Amiga600   -  Aug 19, 2010

Not bad, but it only works on active channel, and users cannot call the script.

 Respond  
RoninWarrior   -  Apr 04, 2007

anytime

 Respond  
ch1zra   -  Apr 04, 2007

lol yeah, I will have to do that one of these days... fake blood down my dirty sweaty forehead and all that...
btw thanx for comment :]

 Respond  
RoninWarrior   -  Apr 04, 2007

pretty nice ch1zra works great.Im still waiting for a pic with you wearing a thorned headband to see if you will look like jesus.

 Respond  
ch1zra   -  Apr 04, 2007

update ^_^

 Respond  
ch1zra   -  Jun 14, 2006

@ noMen

well, i made this for repeating max 10-15 lines... that\'s the reason I haven\'t included a switch for \"repeat all\".

but you\'re free to edit it to suit your needs :)

 Respond  
ch1zra   -  Jun 14, 2006

@ KuTsuM

that would just echo lines... I made this for disconnect situations mainly, so there must be a \"msg $active\".
I later added check for server, and echo part, just to make it nicer, and to avoid error msg :

  • /msg: not connected to server
 Respond  
KuTsuM   -  Jun 13, 2006

errr... try this:

alias last {
if ($1) {
savebuf $1 $active last.txt
loadbuf $1 $active last.txt
.remove last.txt
}
}

 Respond  
noMen   -  Jun 13, 2006

-l

 Respond  
noMen   -  Jun 13, 2006

Usefull. Maybe you should add a check for the existence of table lastline and otherwise /hmake it. Also: how to select all lines? I don\'t want to count them so I\'de like to enter something like 9999 and the snippet gives me all lines instead of an error message.

 Respond  
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.