egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

custom hello/pass routine

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
simo
Owner


Joined: 22 Mar 2015
Posts: 969

PostPosted: Sat Sep 12, 2020 2:36 pm    Post subject: custom hello/pass routine Reply with quote

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
View user's profile Send private message
CrazyCat
Revered One


Joined: 13 Jan 2002
Posts: 1057
Location: France

PostPosted: Sat Sep 12, 2020 6:39 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
simo
Owner


Joined: 22 Mar 2015
Posts: 969

PostPosted: Sat Sep 12, 2020 10:57 pm    Post subject: Reply with quote

Thanks Crazycat
Back to top
View user's profile Send private message
simo
Owner


Joined: 22 Mar 2015
Posts: 969

PostPosted: Wed Sep 07, 2022 9:01 am    Post subject: Reply with quote

could this be used only once and then disabled like the built in regular hello ?
Back to top
View user's profile Send private message
CrazyCat
Revered One


Joined: 13 Jan 2002
Posts: 1057
Location: France

PostPosted: Wed Sep 07, 2022 11:07 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
simo
Owner


Joined: 22 Mar 2015
Posts: 969

PostPosted: Wed Sep 07, 2022 2:29 pm    Post subject: Reply with quote

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
View user's profile Send private message
CrazyCat
Revered One


Joined: 13 Jan 2002
Posts: 1057
Location: France

PostPosted: Wed Sep 07, 2022 6:34 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber