###############$$$%%%%%--- - - - . - - - ---%%%%%%$$$################ ###############$$$%%%%%--- - - - dRk - - - ---%%%%%%$$$################ ###############$$$%%%%%--- - - - . - - - ---%%%%%%$$$################ @revsize=[22] alias addrev { ^on window -* if ([${pastebuf[$0][count]+1}]<=revsize) { @pastebuf[$0][count]++ @pastebuf[$0][$pastebuf[$0][count]]=[$1-] } { @pastebuf[$0][pointer]++ @pastebuf[$0][$pastebuf[$0][pointer]]=[$1-] if (pastebuf[$0][pointer]==revsize) {@pastebuf[$0][pointer]=[0]} } ^on -window * {addrev $0-} } alias paste { ^on window -* @count2=[0] if (![$0]) { if (pastebuf[$winnum()][count]") $pastebuf[$winnum()][$count] } } { for (@count=pastebuf[$winnum()][pointer]+1,count<=revsize,@count++) { @count2++ echo $cparse("%W$[2]count2%K>") $pastebuf[$winnum()][$count] } for (@count=1,count<=pastebuf[$winnum()][pointer],@count++) { @count2++ echo $cparse("%W$[2]count2%K>") $pastebuf[$winnum()][$count] } } }{ if ([$[1]0]==[-]) { if (rindex(a $0)>[0]) { @pnoansi=[true] @pastefrom=[$1] if ([$2]) {@pasteto=[$2]}{@pasteto=[$1]} } if (rindex(m $0)>[0]) { @pmsgto=[$1] @pastefrom=[$2] if ([$3]) {@pasteto=[$3]}{@pasteto=[$2]} } }{ @pastefrom=[$0] if (![$1]) { @pasteto=[$0] }{ @pasteto=[$1] } } if (pnoansi==[true]) { ^alias tempproc {@function_return=stripansicodes($0-)} } { ^alias tempproc {@function_return=[$0-]} } if (pastebuf[$winnum()][count]=pastefrom && count<=pasteto) { if (!pmsgto) { /say $tempproc($pastebuf[$winnum()][$count]) }{/msg $pmsgto $tempproc($pastebuf[$winnum()][$count])} } } } { for (@count=pastebuf[$winnum()][pointer]+1,count<=revsize,@count++) { @count2++ if (count2>=pastefrom && count2<=pasteto) { if (!pmsgto) { /say $tempproc($pastebuf[$winnum()][$count]) }{/msg $pmsgto $tempproc($pastebuf[$winnum()][$count])} } } for (@count=1,count<=pastebuf[$winnum()][pointer],@count++) { @count2++ if (count2>=pastefrom && count2<=pasteto) { if (!pmsgto) { /say $tempproc($pastebuf[$winnum()][$count]) }{/msg $pmsgto $tempproc($pastebuf[$winnum()][$count])} } } ^alias -tempproc } } ^on -window * {addrev $0-} ^assign -pasteto ^assign -pastefrom ^assign -count2 ^assign -pnoansi ^assign -pmsgto } ^on -window * {addrev $0-} ^on -window_kill * { for (@count=1, count<=revsize, @count++) { ^assign -pastebuf[$0][$count] } ^assign -pastebuf[$0][pointer] ^assign -pastebuf[$0][count] } @pastever=[paste.irc] ^eval set format_version $format_version + $pastever registermodule paste 0.0.2 Cut-and-paste module. registermodcmd paste paste Cut and paste command. /paste [flags] .