mIRC Homepage

Help me this code please, thanks all

Posted By: Robert

Help me this code please, thanks all - 23/03/21 05:01 PM

http://www.mpaste.com/p/CKHjJhBe
Posted By: New_One

Re: Help me this code please, thanks all - 24/03/21 12:36 PM

Only NickName in file.txt and has "logged in" can use Bot's command !!! well you can make a channel #Botstaff and than put && ($nick ison #botstaff) , its more better than reading a txt file with all nick that you want to use the bot , you can also make the channel restricted and let only the user that you want to use bot commands , they also can use the bot when they have another nick in the group that actually isnt in te file txt , smile
Posted By: Robert

Re: Help me this code please, thanks all - 24/03/21 02:40 PM

Nice idea, thank you very much. I set like this and it work perfect
if ($nick ison #userbot) && ($nick !isreg #userbot) {
Posted By: maroon

Re: Help me this code please, thanks all - 24/03/21 02:44 PM

Well, Robert, you'll have a better chance of getting help if you can just explain exactly what you want the script to do. If you change the ON TEXT to have the @ prefix, like "on @*:TEXT:*:#channelname: {" it will take action only in the 1 channel instead of being triggered in every channel. The @ prefix avoids the need to have the if() testing if itself is an op there. It's not obvious to a reader what's the difference between the blacklist files, or exactly how the treason4 file is supposed to be associated with the other blacklists if at all.

When hooking the 330 numeric, $1 is yourself, $2 is the nick being whois'ed, and $3 is the account name that's logged in, so you need to compare your access list against the $3. The $modespl identifier contains the max number of modes which can be combined together in the same command. When there are several if() statements which are true if the $1 is the same string, you should probably use elseif for the 2nd and 3rd if you don't want to have it take action against more than 1 of these.
Posted By: Robert

Re: Help me this code please, thanks all - 24/03/21 02:56 PM

Thanks for your easy-to-understand explanation for me and I really thank maroon's enthusiastic help, you are so wonderful.
Posted By: New_One

Re: Help me this code please, thanks all - 24/03/21 06:13 PM

Originally Posted by Robert
Nice idea, thank you very much. I set like this and it work perfect
if ($nick ison #userbot) && ($nick !isreg #userbot) {
dosn't need !sreg just make channel restricted and give access level 3 on those user that you want to use bot komand soo its enough jus ison #channel because no one else can join channel , but it is very good and !sreg
Posted By: Robert

Re: Help me this code please, thanks all - 25/03/21 05:06 AM

Thanks for your help New_One. But i don't need to set +ps or +psi....#userbot, open channel, everyone can join, but only Nick has +v +h +o in #userbot can use my Bot's command. And i have a small code to check if Nick is in userbot.txt and has identied for Nick then my Bot auto voice that nick in userbot.txt. Why i must check identified? Because my server allows people to login passwords within 60 seconds, otherwise the login name will be changed. Someone can fake the Nick of userbot.txt and can use my Bot's command in 60 seconds, so that why i must check userbot.txt and identified and my bot auto voice on #userbot. Besides, i can use another command to add Nick to userbot.txt (Example: !adduserbot Nick ; !deluserbot Nick ; !listuserbot)
Posted By: maroon

Re: Help me this code please, thanks all - 25/03/21 05:36 AM

Is your bot going to do a whois-on-join under the assumption that people login before they join the channel? Or is it going to generate a /whois on someone each time they try to use a .botcommand without being an opvoice or using a .botcommand that doesn't match their op/voice/etc status?

Does your network have a chanserv that has an access list which would automagically give the appropriate status to nicks who are logged into the appropriate account?
Posted By: New_One

Re: Help me this code please, thanks all - 25/03/21 10:13 AM

i was saying that if you wont the bot to execute comands from specific user on some specific channel or one chanel exp #mainchannel , #mainchannel2 etc , than you can open a second channel #bothelp , make channel restricted than only user that have access can join that channel , and the bot with execute commands only from the user that are in #bothelp , so you dont need to make list.txt check etc , its more simple i think , but the important is to do the job that you want smile
© 2021 mIRC Discussion Forums