MySQL Live Status 1.00 STABLE (MBC Base)

Platform:  mIRC
Published  Sep 08, 2011
Updated  Sep 08, 2011
SCREENSHOT: http://www.hawkee.com/profile/img/1014731/

This is a module for MySQL Bot Core system.
You'll need http://www.hawkee.com/snippet/8882/ in case for this to work.

PHP Side for this script: http://www.hawkee.com/snippet/8963/

MySQL Database Structure:
Code
 
; MySQL Bot Core
; Module: Live Status
; Version: 1.00 STABLE
; Author: Nils Putnins (Neisen@Neisen.lv)

; - aliases
alias -l m.activity.status return $replace($left($nick($1,$2).pnick,1),~,5,&,4,@,3,$chr(37),2,+,1)
alias -l m.activity {
if ($prop == sync) {
var %sql = DELETE FROM `chanstatus` | noop $mysql_query(%m.sql, %sql)
var %sql = INSERT INTO `chanstatus` (`channel`,`nickname`,`status`,`idle`,`address`) VALUES (?, ?, ?, ?, ?)
var %channels = $chan(0)
while %channels {
var %channel = $chan(%channels), %users = $nick(%channel,0)
while %users {
var %user = $nick(%channel,%users)
noop $mysql_query(%m.sql, %sql, %channel, %user, $m.activity.status(%channel,%user), $nick(%channel,%user).idle, $remove($address(%user,0),*!))
dec %users
}
dec %channels
}
}
}

; - communicating with core
on *:SIGNAL:m.modules:{
m.modules $+(Live Status,$chr(124),$chr(124),0)
noop $m.activity().sync
}

Comments

Sign in to comment.
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.