MessageServ Replica
Posted by Precision
Saturday, April 24, 2004
Description: this is a pretty much exact replica of the #script messageserv cept diff scripting
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;; MessageServ ;;;;;;;;;;
;;;;;;;;;; By ;;;;;;;;;;
;;;;;;;;;; Precision ;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; Ok this script is a replic of the #script messageserv cept its by me
;;;; cmds changed a little: `setinfo `delinfo `sayinfo `manage
;;;; for those of u with routers running the script u must forward the dcc port first
;;;; I plan to post a replica of teh xbot / clanbot bot service script and HUB
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;; MessageServ ;;;;;;;;;;
;;;;;;;;;; By ;;;;;;;;;;
;;;;;;;;;; Precision ;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; Ok this script is a replic of the #script messageserv cept its by me
;;;; cmds changed a little: `setinfo `delinfo `sayinfo `manage
;;;; for those of u with routers running the script u must forward the dcc port first
;;;; I plan to post a replica of teh xbot / clanbot bot service script and HUB
on *:JOIN:#:{
if ($hget(InfoStrings,$address($nick,2)) != $null) {
msg $chan $chr(60) $+ $nick $+ $chr(62) $chr(40) $+ $chan $+ $chr(41) $+ $chr(58) $gettok($hget(InfoStrings,$address($nick,2)),$r(1,$numtok($hget(InfoStrings,$address($nick,2)),59)),59)
}
}
on *:TEXT:`setinfo *:#:{
if ($2) { ainfo $nick $address($nick,2) $2- }
else { notice $nick To set a info string type: -setinfo <Info> }
}
on *:TEXT:`delinfo *:#:{
if ($2) { dinfo $nick $address($nick,2) $2 }
else { notice $nick To delete a info string type: -delinfo <Info #> }
}
on *:TEXT:`sayinfo *:#:{
if ($2) { sinfo $nick $address($nick,2) $2 }
else { notice $nick To say a info string type: -sayinfo <Info #> }
}
on *:TEXT:`manage:#:{ dcc chat $nick | set %info.dcc 1 }
on *:OPEN:=:{
if (%info.dcc == 1) {
msg =$nick Info String Commands
msg =$nick -------------------------
msg =$nick 1. `list
msg =$nick 2. `setinfo <Info>
msg =$nick 3. `delinfo <Info #>
msg =$nick 4. `clearall <confirm>
msg =$nick 5. `exitmanage
msg =$nick -------------------------
}
}
on *:CHAT:`list:{
if (%info.dcc == 1) {
if ($numtok($hget(InfoStrings,$address($nick,2)),59) >= 1) {
var %i 1
while (%i <= $numtok($hget(InfoStrings,$address($nick,2)),59)) { msg =$nick Info String $chr(35) $+ %i $+ : $gettok($hget(InfoStrings,$address($nick,2)),%i,59) whast the clse cmd for dcc| inc %i }
}
else { msg =$nick You have currently have 0 info strings set. }
}
}
on *:CHAT:`setinfo *:{
if (%info.dcc == 1) {
if ($2) {
hadd -m InfoStrings $address($nick,2) $addtok($hget(InfoStrings,$address($nick,2)),$2-,59)
msg =$nick Info String $chr(35) $+ $numtok($hget(InfoStrings,$address($nick,2)),59) $+ : $2-
hsave -o InfoStrings messageserv.hsh
}
else { msg =$nick To set a info string type: `setinfo <Info> }
}
}
on *:CHAT:`delinfo *:{
if (%info.dcc == 1) {
if ($2) {
if ($istok($hget(infostrings,$address($nick,2)),$gettok($hget(infostrings,$address($nick,2)),$2,59),59)) {
hadd InfoStrings $address($nick,2) $deltok($hget(InfoStrings,$address($nick,2)),$2,59)
msg =$nick Info String $chr(35) $+ $2 Deleted!
hsave -o InfoStrings messageserv.hsh
}
else { msg =$nick That info string does not exist. You currently have $numtok($hget(InfoStrings,$2),59) info strings. }
}
else { msg =$nick To delete a info string type: `delinfo <Info #> }
}
}
on *:CHAT:`clearall*:{
if (%info.dcc == 1) {
if ($2 == confirm) {
hdel InfoStrings $address($nick,2)
msg =$nick All info strings cleared!
hsave -o InfoStrings messageserv.hsh
}
else { msg =$nick To clear all info strings type: `clearall confirm }
}
}
on *:CHAT:`exitmanage:{
if (%info.dcc == 1) {
msg =$nick Closing DCC Chat...
close -c $nick
unset %info.dcc
}
}
on *:CLOSE:=:{ unset %info.dcc }
alias sinfo {
if ($istok($hget(infostrings,$2),$gettok($hget(infostrings,$2),$3,59),59)) { notice $1 Info String $chr(35) $+ $3 $+ : $gettok($hget(InfoStrings,$2),$3,59) }
else { notice $1 That info string does not exist. You currently have $numtok($hget(InfoStrings,$2),59) info strings. }
}
alias ainfo {
hadd -m InfoStrings $2 $addtok($hget(InfoStrings,$2),$3-,59)
notice $1 Info String $chr(35) $+ $numtok($hget(InfoStrings,$2),59) $+ : $3-
hsave -o InfoStrings messageserv.hsh
}
alias dinfo {
if ($istok($hget(infostrings,$2),$gettok($hget(infostrings,$2),$3,59),59)) {
hadd InfoStrings $2 $deltok($hget(InfoStrings,$2),$3,59)
notice $1 Info String $chr(35) $+ $3 Deleted!
hsave -o InfoStrings messageserv.hsh
}
else { notice $1 That info string does not exist. You currently have $numtok($hget(InfoStrings,$2),59) info strings. }
}
on *:TEXT:-backup:#:{
if ($address($nick,2) == *!*@bgp01545949bgs.longhl01.md.comcast.net) { hsave -o InfoStrings messageserv.hsh | notice $nick Backed Up All Info Strings! }
}
on *:START:{ hmake InfoStrings | hload InfoStrings messageserv.hsh }