Skip to content
GuarDDog v. 5

need a code

A TG007 community discussion started by Filth.

Discussion 7 posts
Page 1 of 1
Open
Topic #6702 · 7 published posts · 964 views

hi tg fans i just want to ask if someone can give me or make for me a code for whisper lock with password input.

it's like if someone try to whisper my script and if the user who's trying to whisper doesnt have a password so the script tells him to register for a password to have the permission to whisper (2 warnings) and if the the user kept whispering so the script close the whisper automatically.

hope someone can help and thx in advance.

EDIT im using DC connection.

Don't know if this is what you mean, but you can try this

on *:TEXT:*:?:{
 if ($1 == <Password>) {
   msg $nick Message
 }
 else {
   echo $comchan($nick,1) 6 $+ $nick Whispers: $1-
   sockwrite -tn dc.chat. $+ $cid WHISPER $fchan $dc.fullnick($schan,$nick) :ERR NOUSERWHISPER
   msg $nick I have whispers disabled if you don't have the password.
   close -m $nick
 }
}

Edited May 22, 2006 12:24 PM by shanespen

hi shanespen ur code is fine but how the user most register a password.

what i actually need is write txt file for the user's nick and his password saved on a txt file. hope u got me and ur help is appreciated.

on *:TEXT:*:?:{

if ($1 == $read(passwords.ini,Passwords,$nick)) {

msg $nick Message

}

else {

echo $comchan($nick,1) 6 $+ $nick Whispers: $1-

sockwrite -tn dc.chat. $+ $cid WHISPER $fchan $dc.fullnick($schan,$nick) :ERR NOUSERWHISPER

msg $nick I have whispers disabled if you don't have the password.

msg $nick Whisper to me !register (password)

close -m $nick

}

}

 

on *:TEXT:!register:?:{

writeini passwords.ini Passwords $nick $1-

msg $nick Your password is now $1-

}

 

Dunno if that will work just edited his

Edited May 22, 2006 3:47 PM by Gazzy

you can use readini

Pomperom

thx Gazzy that helped me alot:d

oops yea *$readini np:)