mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Mar 2021
Posts: 48
R
Robert Offline OP
Ameglian cow
OP Offline
Ameglian cow
R
Joined: Mar 2021
Posts: 48

Joined: Jan 2021
Posts: 17
N
Pikka bird
Offline
Pikka bird
N
Joined: Jan 2021
Posts: 17
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

Joined: Mar 2021
Posts: 48
R
Robert Offline OP
Ameglian cow
OP Offline
Ameglian cow
R
Joined: Mar 2021
Posts: 48
Nice idea, thank you very much. I set like this and it work perfect
if ($nick ison #userbot) && ($nick !isreg #userbot) {

Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
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.

Joined: Mar 2021
Posts: 48
R
Robert Offline OP
Ameglian cow
OP Offline
Ameglian cow
R
Joined: Mar 2021
Posts: 48
Thanks for your easy-to-understand explanation for me and I really thank maroon's enthusiastic help, you are so wonderful.

Joined: Jan 2021
Posts: 17
N
Pikka bird
Offline
Pikka bird
N
Joined: Jan 2021
Posts: 17
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

Joined: Mar 2021
Posts: 48
R
Robert Offline OP
Ameglian cow
OP Offline
Ameglian cow
R
Joined: Mar 2021
Posts: 48
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)

Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
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?

Joined: Jan 2021
Posts: 17
N
Pikka bird
Offline
Pikka bird
N
Joined: Jan 2021
Posts: 17
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


Link Copied to Clipboard