View previous topic :: View next topic |
Author |
Message |
simo Owner
Joined: 22 Mar 2015 Posts: 969
|
Posted: Sat Sep 12, 2020 2:36 pm Post subject: custom hello/pass routine |
|
|
hey there,
ive modify a small tcl i found somewhere to have it function as a custom hello/ pass routine without the built in one wich takes the current used nick as user while we want to customize that to fill in our own
this is what i have so far:
Code: |
bind msg - helloo hello:routine
proc hello:routine {nick host hand text} {
global botnick
set user1 [lindex [split $text] 0]
set password [lindex [split $text] 1]
adduser $user1 [maskhost $host 2]
chattr $user1 +jlmnoptx
putserv "NOTICE $nick :Hi $nick I'm $botnick, an eggdrop bot."
putserv "NOTICE $nick :I'll recognize you by hostmask '[maskhost $host 2]' with password $password from now on ."
putserv "NOTICE $nick :YOU ARE THE OWNER ON THIS BOT NOW"
putserv "NOTICE $nick :All major commands are used from DCC chat. From now on, you don't need to use the -m option when starting the bot. Enjoy !!!"
return 0
}
|
what im missing is the password setting |
|
Back to top |
|
 |
CrazyCat Revered One

Joined: 13 Jan 2002 Posts: 1057 Location: France
|
Posted: Sat Sep 12, 2020 6:39 pm Post subject: |
|
|
Something like:
Code: | setuser $user1 PASS $password |
Put that after the adduser line
And you can just do a chattr $user1 +n, other flags are included in it. _________________ https://www.eggdrop.fr - French IRC network
Offer me a coffee - Do not ask me help in PM, we are a community. |
|
Back to top |
|
 |
simo Owner
Joined: 22 Mar 2015 Posts: 969
|
Posted: Sat Sep 12, 2020 10:57 pm Post subject: |
|
|
Thanks Crazycat |
|
Back to top |
|
 |
simo Owner
Joined: 22 Mar 2015 Posts: 969
|
Posted: Wed Sep 07, 2022 9:01 am Post subject: |
|
|
could this be used only once and then disabled like the built in regular hello ? |
|
Back to top |
|
 |
CrazyCat Revered One

Joined: 13 Jan 2002 Posts: 1057 Location: France
|
Posted: Wed Sep 07, 2022 11:07 am Post subject: |
|
|
simo wrote: | could this be used only once and then disabled like the built in regular hello ? |
The only way to do that is to activate the bind only if the userlist is empty, so something like:
Code: | if {[countusers]==0} {
bind msg - helloo hello:routine
} |
And indeed, unbind at the end of the hello:routine.
But I don't really understand why you're trying to create this script as the /msg hello function works well. If you do that only to not have 2 commands to register to your eggdrop, I think it's a waste of time _________________ https://www.eggdrop.fr - French IRC network
Offer me a coffee - Do not ask me help in PM, we are a community. |
|
Back to top |
|
 |
simo Owner
Joined: 22 Mar 2015 Posts: 969
|
Posted: Wed Sep 07, 2022 2:29 pm Post subject: |
|
|
Thanks crazycat, its to decide what user to use as i dont always want to use the nick im currently connected with and dont want to include ident in the host but rather use *!*@host |
|
Back to top |
|
 |
CrazyCat Revered One

Joined: 13 Jan 2002 Posts: 1057 Location: France
|
Posted: Wed Sep 07, 2022 6:34 pm Post subject: |
|
|
using telnet with user "NEW" is the best way to create a new owner, more secure than the /msg botnick hello or any IRC command. _________________ https://www.eggdrop.fr - French IRC network
Offer me a coffee - Do not ask me help in PM, we are a community. |
|
Back to top |
|
 |
|