Jump to content

Archived

This topic is now archived and is closed to further replies.

chain

MySQL Seen System 1.00 STABLE (MBC Base)

Recommended Posts

  • Administrators

MySQL Seen System 1.00 STABLE (MBC Base)

 

logo.jpg

 

This is a module for MySQL Bot Core system.

You'll need http://www.hawkee.com/snippet/8882/ in case for this to work.

 

Quote:

[15] !seen rootsecure

[15] -#DEV-SQL- Last seen rootsecure at 2011-09-05 15:28:01 saying something on ###

 

 

MySQL Database Structure:

Code:

CREATE TABLE `seen` (

`nickname` varchar(50) NOT NULL,

`address` varchar(200) NOT NULL,

`time` datetime NOT NULL,

`network` varchar(50) NOT NULL,

`action` enum('j','p','q','n','a','t') NOT NULL,

`extra` varchar(100) NOT NULL,

PRIMARY KEY (`nickname`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

 

>; MySQL Bot Core; Module: Seen System; Version: 1.00 BETA; Author: Nils Putnins (Neisen@Neisen.lv) ; - aliasesalias -l m.seen {  if (!$isid && $3) {    var %sql = REPLACE INTO `seen` (`nickname`,`address`,`time`,`network`,`action`,`extra`) VALUES (?, ?, NOW(), ?, ?, ?)    noop $mysql_query(%m.sql, %sql, $1, $2, $network, $left($3, 1), $4)  }  else if ($1) {    if ($1 == $me) return Uhm...?    else if ($1 == $nick) return Ehm...?    else if ($1 ison $2) return Erhm..?    var %result = $m.dbres(time,seen,nickname,$1)    $iif(!%result,return No seen results for this nickname.)    var %extra = $m.dbres(extra,seen,nickname,$1)    return Last seen $bold($1) at $bold(%result) $iif(%extra,$m.seen.action($m.dbres(action,seen,nickname,$1)) %extra)  }} alias -l m.seen.action {  if ($1 = t) return saying something on  else if ($1 = a) return making action in  else if ($1 = q) return quitting  else if ($1 = j) return joining  else if ($1 = p) return parting} ; - actionson *:JOIN:#:m.seen $nick $fulladdress join $chanon *:PART:#:m.seen $nick $fulladdress part $chanon *:QUIT:m.seen $nick $fulladdress quiton *:NICK:m.seen $nick $fulladdress nick $newnickon *:ACTION:*:#:m.seen $nick $fulladdress action $chanon *:TEXT:*:*:{  if ($chan) m.seen $nick $fulladdress text $chan  if ($1 == $command(seen)) $iif($chan,notice,msg) $nick $m.seen($2,$chan)} 

Link to comment
Share on other sites



×
×
  • Create New...