|
Joined: Dec 2004
Posts: 80
Babel fish
|
OP
Babel fish
Joined: Dec 2004
Posts: 80 |
hi,i wana make a password script and i have no idea how,but i do no what it's like this is what its like: when someone join the channel,the bot ask the user the password,if they answer the password right they get to stay on then channel,if they're wrong they'r kicked,and if they dont answer the bot,they get to say 3 thing before the bot kick em,and i also like a script that changeds the password, so anyone have an idea,cuz i need it,thanks
practice makes perfect...
|
|
|
|
Joined: Oct 2003
Posts: 3,918
Hoopy frood
|
Hoopy frood
Joined: Oct 2003
Posts: 3,918 |
type /set %p_chan #YOUR_CHANNEL_NAME and /set %p_pass YOURPASSWORD and then add the following code block to your remotes (alt-r). The user has to type /notice YOURBOTNAME pass PASSWORD Your 'password changing script' is simply: /set %p_pass NEWPASSWORD or you can make some simple alias like alias newpass { set %p_pass $$1 }
ON @*:JOIN:%p_chan: {
.notice $nick Please type /notice $me pass PASSWORD to stay on this channel, or you will be removed.
.set %pass. [ $+ [ $nick ] ] 3
}
ON @*:TEXT:#YOURCHANNEL: {
if (%pass. [ $+ [ $nick ] ]) {
dec %pass. $+ $nick
if (%pass. [ $+ [ $nick ] ] == 0) {
p_remove $nick $fulladdress
}
}
}
ON ^*:NOTICE:pass *:?: {
if (%pass. [ $+ [ $nick ] ] && $nick ison %p_chan) {
if ($2 != %p_pass) {
.notice $nick Incorrect password, removing you from %p_chan
p_remove $nick $fulladdress
}
else {
.notice $nick Correct password, thank you.
unset %pass. $+ $nick
}
}
haltdef
}
alias -l p_remove {
mode %p_chan -ob $$1 $mask($$2,3)
kick %p_chan $$1 You are not allowed in this channel
unset %pass. $+ $$1
}
- argv[0] on EFnet #mIRC - "Life is a pointer to an integer without a cast"
|
|
|
|
Joined: Dec 2004
Posts: 80
Babel fish
|
OP
Babel fish
Joined: Dec 2004
Posts: 80 |
i tryed it,it doenst work and its so confusing
practice makes perfect...
|
|
|
|
Joined: Nov 2004
Posts: 332
Fjord artisan
|
Fjord artisan
Joined: Nov 2004
Posts: 332 |
ive got a version in my bot but the way it works is if you type the password which is the content of %x it add whatever follows to the user list i dont know if it will help but here u go i keep this for if im ever abroad
#remoteaccess on
on *:text:!ruser *:*:{
if ($ulevel >= 4) {
ruser $$2
closemsg $nick
}
}
[color:red]on *:text:!pass *:*:{
if ($ulevel >= 4) {
unset -s %x
set -s %x $$2-
closemsg $nick
}
}
on *:text:*:*:{
if ($1 = %x) {
auser $$2-
closemsg $nick
}
}
[/color]#remoteaccess end
you can easily modify this so that it sets a user level dor them useing $address then just make the function you want them to be able to access available to that level
Last edited by ricky_knuckles; 01/02/05 11:42 PM.
The Kodokan will move you, one way or another.
|
|
|
|
Joined: Nov 2004
Posts: 332
Fjord artisan
|
Fjord artisan
Joined: Nov 2004
Posts: 332 |
i threw this together but it doesnt work which is interesting
alias /pass {
set %x $$1
}
on @*:join:#:{
msg $nick enter the pass please.
timer $+ $nick 1 20 kick $chan $nick
closemsg $nick
}
on @*:text:!pass *:?:{
if ($$2- = %x) {
timer $+ $nick off
closemsg $nick
}
}
Last edited by ricky_knuckles; 02/02/05 12:18 AM.
The Kodokan will move you, one way or another.
|
|
|
|
Joined: Dec 2004
Posts: 81
Babel fish
|
Babel fish
Joined: Dec 2004
Posts: 81 |
; channel lockout
ON !*:JOIN:#channelname:{
.notice $nick You must type /notice $me PASS <password> to stay in this $&
channel. If you dont respond you have the ability to say three lines until $&
you are forced out of this channel. Thank you.
if (!$evalnext($+(%,keepout.,$site))) {
set $+(%,keepout.,$site) 3
}
}
ON @*:TEXT:*:#channelname:{
if ($nick ison $chan) {
if ($evalnext($+(%,keepout.,$site))) {
if ($evalnext($+(%,keepout.,$site)) <= 3) { dec %keepout. [ $+ [ $site ] ] }
if ($evalnext($+(%,keepout.,$site)) <= 0) {
ban -u120 # $nick 3
kick # $nick You've been warned and havent identified to me in which you are $&
now not welcome here. [2min ban]
unset %keepout. [ $+ [ $site ] ]
}
}
}
}
ON !*:NOTICE:pass *:?:{
if ($2 == %keepoutPASS) {
if ($evalnext($+(%,keepout.,$site))) {
.notice $nick Password accepted!
unset %keepout. [ $+ [ $site ] ]
}
}
elseif ($2 != %keepoutPASS) { .notice $nick Password incorrect. }
}
You have to set %keepoutPASS to the password you want. Also I'm using $site just for protection from people who want to change their nicknames and attempt to avoid the script. This method isnt completely secure due to the fact that some irc server software like UnrealIRCD prefixes users host upon connecting. Then the user can simply change the mode +x to -x meaning their hostmask wont be prefixed anymore.
|
|
|
|
Joined: Nov 2003
Posts: 2,327
Hoopy frood
|
Hoopy frood
Joined: Nov 2003
Posts: 2,327 |
The reason it doesn't work is because of the @ part of your on @*:text:!pass *:?: event, it's not possible to be an operator in a query so the event will never be triggered while the @ is there.
New username: hixxy
|
|
|
|
Joined: Nov 2004
Posts: 332
Fjord artisan
|
Fjord artisan
Joined: Nov 2004
Posts: 332 |
The Kodokan will move you, one way or another.
|
|
|
|
Joined: Mar 2004
Posts: 96
Babel fish
|
Babel fish
Joined: Mar 2004
Posts: 96 |
Nevermind, figured it out
Last edited by Gremel; 03/02/05 01:45 AM.
|
|
|
|
Joined: Dec 2004
Posts: 80
Babel fish
|
OP
Babel fish
Joined: Dec 2004
Posts: 80 |
ya...but how do i change the password and stuff? i just want a simple password script that do what i desribed...
practice makes perfect...
|
|
|
|
Joined: Mar 2004
Posts: 96
Babel fish
|
Babel fish
Joined: Mar 2004
Posts: 96 |
When ever you wish to change the password, just change the $keepoutPASS to your password.
ie)
$keepoutPASS changed to GREMEL
|
|
|
|
Joined: Sep 2003
Posts: 4,230
Hoopy frood
|
Hoopy frood
Joined: Sep 2003
Posts: 4,230 |
When ever you wish to change the password, just change the $keepoutPASS to your password.
ie)
$keepoutPASS changed to GREMEL ^ ummm u mean %keepoutPASS, there is no alias by that name.
|
|
|
|
Joined: Mar 2004
Posts: 96
Babel fish
|
Babel fish
Joined: Mar 2004
Posts: 96 |
oops, not used to typing %
|
|
|
|
|