on 1:text:!whodat help*:*:{
.timer 1 1 msg $nick Enter all the following commands in a query window.
.timer 1 2 msg $nick !pass <your password> Sets your password with the Whodat system as well as tagline system
.timer 1 3 msg $nick !whodat pass <pass> <info> To add/change Your Whodat information
.timer 1 4 msg $nick !whodat read Views your information
.timer 1 5 msg $nick Whodat is a system to provide basic information for visitors of the channel. It's for amusement only and we recommend not to use personal info that you would not give a stranger on the street.
.timer 1 6 msg $nick !whodat <nick> to retrieve the selected nicks information
}
;
;
;
on *:TEXT:!whodat pass *:*:{
;
;^ replaced !whodat <pass> with !whodat pass <pass> becuase its hard to identify if a user is entering !whodat <pass> or !whodat <nick>
;
if ($readini(mcbpwd.ini,n,$nick,pass) == $null) { .msg $nick please use !pass before setting your whodat information | halt }
if ($readini(mcbpwd.ini,n,$nick,pass) != $hash($3,32)) { .msg $nick the password you supplied is incorrect please try again | halt }
;
;^ removed the ELSE since you are halting the event inside the IF's , so this is done only if above IFs fail.
;
writeini -n whodat.ini $nick tag $4-
msg $nick Your whodat information is now set to:
msg $nick $readini(whodat.ini,n,$nick,tag)
;
;^ replaced the old $readini with the new format $readini()
;
}
;
;
;
on *:TEXT:!whodat read:*:{
;
;^ replaced matchtext "!whodat read*" with "!whodat read" to cover for a !whodat <nick> using a nick starting with Read ie: !whodat ReaderOfMinds
;
if ($readini(whodat.ini,n,$nick,tag)) {
;
;^ added a check to ensure user exists in whodat database
;
msg $nick your present whodat information is :
msg $nick $readini(whodat.ini,n,$nick,tag)
;
;^ replaced the old $readini with the new format $readini()
;
}
halt
;
; ** PLEASE NOTE >>>>> IF you want it to display to a nick "your present whodat information is :" and nothing more if its not set, then remove the above and replace with below.
;
msg $nick your present whodat information is :
msg $nick $$readini(whodat.ini,n,$nick,tag)
;
;^ replaced the old $readini with the new format $readini()and used $$ to stop line if no info
;
}
;
;
;
on *:TEXT:!whodat *:*:{
;
;^ changed # to * to allow for channel or PM's of !whodat <nick>
;
echo -a CP1 t> $target n> $nick c> $chan p> $1-
if ($readini(whodat.ini,n,$2,tag)) {
;
;^ added a check to ensure user exists in whodat database
;
msg $iif($chan,$chan,$nick) Present whodat information for $2 is :
msg $iif($chan,$chan,$nick) $readini(whodat.ini,n,$2,tag)
}
else {
msg $iif($chan,$chan,$nick) Sorry $nick but $2- is not known to me.
}
;
;^ replaced $nick with $iif($chan,$chan,$nick) this well be $chan if in a channel or $nick if in PM, i think theres a $identifier for it but cant think of it.
;
}