Source

ircfs / plugins / misc.brc


+cmd ping plugins help

fn ping {
 if ( ~ $text(1) [Pp]^[Ii]^[Nn]^[Gg] ) {
  reply Pong
 }
}

fn plugins {
 if ( ~ $text(1) plugins) {
	reply $cmds $evts
 }
}


# each command will have a fn which will display a description

fn help {
 if ( ~ $text(1) [hH] help ayuda) {
  if ( ~ $#text 1 ) {
	reply ping plugins define fth fthe translate
  } else {
	switch ($text(2)) {
	 case ping		; reply 'Replies with PONG'
	 case plugins	; reply 'displays all plugins loaded'
	 case define	; reply 'defines word(2)'
	 case fth fthe	; reply 'executes forth command'
	 case translate ; reply '(en2es 2es) TEXT'
	}
  }
 }
}