Commits

lan Nomar committed 89872e6

+f ii-plugins.brc plugins/rms.brc

Comments (0)

Files changed (2)

+#!/usr/bin/env brc
+
+# individual, make this a function
+dir		= $*
+inF		= $^*/in
+outF	= $^*/out
+ifs=/ { *=`{echo -n $*} 
+	chan = $$#*
+	*=$* {	shift ; serv = $#*	}
+	serv = $*($serv)
+}
+
+ echo -n loading: 
+  for (* in `{ cat $dir/cmds } ) {
+	echo '	'^$^*
+	{ . /home/nal/Oven/Potatoes/ircfs/plugins/$^*.brc }
+  }
+
+fn say		{ echo $* > $inF }
+fn reply	{ echo $^name: $* > $inF }
+
+tail -f -n0 $^dir/out | while (true) { # that true bothers me
+ *=`{ask}
+ date = $1
+ time = $2
+ name = `` '<>' { echo -n $3 }
+	shift 3
+ text = $*
+ for (* in $cmds) { $* }
+}
+
+
+
+
+
+
+
+cmds=($cmds rms)
+
+fn rms { ~ $text *^[Ll]^[Ii]^[Nn]^[Uu]^[Xx]^* && {
+ ~ $text *GNU/Linux* || reply 'es GNU/Linux!' }
+}