mIRC Home    About    Download    Register    News    Help

Print Thread
Help me this code please, thanks all #268600 23/03/21 05:01 PM
Joined: Mar 2021
Posts: 14
R
Robert Offline OP
Pikka bird
OP Offline
Pikka bird
R
Joined: Mar 2021
Posts: 14

Re: Help me this code please, thanks all [Re: Robert] #268603 24/03/21 12:36 PM
Joined: Jan 2021
Posts: 7
N
New_One Offline
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
N
Joined: Jan 2021
Posts: 7
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

Re: Help me this code please, thanks all [Re: New_One] #268605 24/03/21 02:40 PM
Joined: Mar 2021
Posts: 14
R
Robert Offline OP
Pikka bird
OP Offline
Pikka bird
R
Joined: Mar 2021
Posts: 14
Nice idea, thank you very much. I set like this and it work perfect
if ($nick ison #userbot) && ($nick !isreg #userbot) {

Re: Help me this code please, thanks all [Re: Robert] #268606 24/03/21 02:44 PM
Joined: Jan 2004
Posts: 1,558
maroon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,558
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.

Re: Help me this code please, thanks all [Re: maroon] #268607 24/03/21 02:56 PM
Joined: Mar 2021
Posts: 14
R
Robert Offline OP
Pikka bird
OP Offline
Pikka bird
R
Joined: Mar 2021
Posts: 14
Thanks for your easy-to-understand explanation for me and I really thank maroon's enthusiastic help, you are so wonderful.

Re: Help me this code please, thanks all [Re: Robert] #268608 24/03/21 06:13 PM
Joined: Jan 2021
Posts: 7
N
New_One Offline
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
N
Joined: Jan 2021
Posts: 7
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

Re: Help me this code please, thanks all [Re: New_One] #268610 25/03/21 05:06 AM
Joined: Mar 2021
Posts: 14
R
Robert Offline OP
Pikka bird
OP Offline
Pikka bird
R
Joined: Mar 2021
Posts: 14
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)

Re: Help me this code please, thanks all [Re: Robert] #268611 25/03/21 05:36 AM
Joined: Jan 2004
Posts: 1,558
maroon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,558
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?

Re: Help me this code please, thanks all [Re: Robert] #268612 25/03/21 10:13 AM
Joined: Jan 2021
Posts: 7
N
New_One Offline
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
N
Joined: Jan 2021
Posts: 7
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