#/set continued_line - ############################### lily mode ##################################### # By Josh Wilmes (wilmesj@rpi.edu) # note, blurbpoll is broken. # detach and review are hard.. a bot perhaps. # /info and /finger should be implemented with dcc, I think, probably to a bot set novice off load tabkey load cursor set scroll on bind : parse_command lily.colon bind ; parse_command lily.semicolon set input_protection off set client_information Lily-Mode # enable pager set hold_mode on on ^input * lily.inputaction $* on ^msg * lily.privmsg $* on ^public * lily.publicmsg $* on ^public_msg * lily.publicmsg $* on ^public_other * lily.publicmsg $* on ^send_public * lily.mymsg $* on ^send_msg * lily.mymsg $* #on +ctcp_reply * BLURBPOLL lily.ctcpblurbpoll $* on ^ctcp "* * BLURB" lily.ctcpblurb $* on ^who * lily.who $* @ long_form = [1] alias who { echo echo Name From echo ---- ---- //who 0 } alias lily.who { if ([$blurbget($1)]) { echo $2 $1 [$blurbget($1)] $6- from $4 } { echo $2 $1 $6- from $4 } } alias what list alias why { echo Why not? } alias where { echo You are a member of $mychannels() } alias away { if ([$*]) { blurb $*;//away $* } { //away away } } alias here { //away if ([$*]) { blurb $*; echo *** you are now here with the blurb [$lilyblurb] } { echo *** you are now here } } alias blurb { if ([$*] ) { @ lilyblurb = [$*] ctcp #lily BLURB $lilyblurb echo *** your blurb has been set to [$lilyblurb] } { echo *** your blurb is currently set to [$lilyblurb] } } alias long { echo *** Switching to lily LONG form *** @ long_form = [1] } alias short { echo *** Switching to lily SHORT form *** @ long_form = [0] } alias lily.ctcpblurbpoll { # We (or someone) sent a CTCP BLURBPOLL to #lily, send a CTCP BLURB echo *** BLURBPOLL recvd. Sending BLURB. ctcp #lily BLURB $lilyblurb } alias lily.ctcpblurb { # Someone sent a CTCP BLURB to #lily. This indicates that they have # changed their blurb. # echo *** BLURB recieved for $0 -> [$3-] blurbset $0 $3- } alias lily.privmsg { if ( [$long_form] ) { echo if ([$blurbget($0)]) { @ theirblurb = [$blurbget($0)] echo >> Private message from $0 [$theirblurb]: } { echo >> Private message from $0: } echo - $1- } { echo $1- } lily.updatestatus } alias lily.publicmsg { if ( [$long_form] ) { echo if ([$blurbget($0)]) { @ theirblurb = [$blurbget($0)] echo -> From $0 [$theirblurb], to $1: } { echo -> From $0, to $1: } echo - $2- } { echo <$0 -> $1> $2- } } alias lily.mymsg { if ( [$long_form] ) { echo if ([$lilyblurb]) { echo >> From Me [$lilyblurb], to $0: } { echo >> From Me, to $0: } echo - $1- } { echo -> $0: $1- } } alias lily.inputaction { if (! [$dest] ) { sendline $L } { # Hack: pick a big number(300) if (index(: $L) > -1) { @ msg = mid(${index(: $L) + 1} 300 $L) } { @ msg = mid(${index(; $L) + 1} 300 $L) } @ cn = [#$dest] @ mych = mychannels() if ( match($cn $mych) != 0 ) { sendline /msg $cn $msg } { sendline /msg $dest $msg } @ lastdest = [$dest] } @ dest = [] lily.updatestatus } alias lily.updatestatus { if ( [$,] ) { @ colon = [$,] } { @ colon = [$lastdest] } if ( [$lastdest] ) { @ semi = [$lastdest] } { @ semi = [$,] } set status_user Lily-Mode :$colon \;$semi -- [$lilyblurb] } alias lily.colon { @ dest = left($index(: $L) $L) if ( ! [$dest] ) { if ( [$,] ) { @ dest = [$,] } { @ dest = [$lastdest] } xtype -literal $dest: } { xtype -literal : } } alias lily.semicolon { @ dest = left($index(; $L) $L) if ( ! [$dest] ) { if ( [$lastdest] ) { @ dest = [$lastdest] } { @ dest = [$,] } xtype -literal $dest\; } { xtype -literal \; } } ############################################################################### # Taken from CROSS by DeadelviS ^alias blurbset ^assign blurbdb[$encode($tolower($0))] $1- ^alias blurbget @ function_return = [$blurbdb[$encode($tolower($0))]] ############################################################################## # Join #lily if we arent there yet. @ cn = [#lily] @ mych = mychannels() if ( match($cn $mych) == 0 ) { join #lily ctcp #lily BLURB $lilyblurb } echo @@@@@@@@@@@@@@@@@@@@@@@@ Lily Emulation Loaded @@@@@@@@@@@@@@@@@@@@@@@@@@ echo @@@ /long : use long (lily-style) output (default) echo @@@ /short: use short (irc-style) output echo @@@ /who : list users online echo @@@ /what : list discussions echo @@@ /where: list discussions you are a member of echo @@@ /blurb: set your blurb echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ input "Please enter a blurb, or hit for none --> " blurb $* lily.updatestatus