I was wondering, does anyone know if it is possible for a script to be just a normal user and not an op?
I was thinking that maybe the dataArrival sub could be used to catch a request for info, and send a $MyInfo string back, with a non-op user name.
Is there another way?
scripts as regular users?
Moderator: Moderators
-
Paul_Don
- Posts: 146
- Joined: 2003-01-29 11:41
- Location: uk
-
ivulfusbar
- Posts: 506
- Joined: 2003-01-03 12:33
first of all, any bot that doesn't exists for security, banning, kicking etc.. should always be implimented (im my opinion) outside the hub. I recomend you write 3d party bot in the language you are familiar with and host it some computer you have left over.
Everyone is supposed to download from the hubs, - I don´t know why, but I never do anymore.
-
ender
- Posts: 224
- Joined: 2003-01-03 22:47
To make a scripted bot appear as normal user, comment out the lines that say frmHub.RegisterBotName ..., and add the following to NewUserConnected sub:
Code: Select all
sub NewUserConnected(curUser)
curUser.SendData "$Hello <name_of_the_bot>"
end sub-
HaArD
- Posts: 147
- Joined: 2003-01-04 07:20
- Location: Canada http://hub-link.sf.net
Or you could use this:
Which will populate the User list with all the fields.. (Nick, Shared, Description, Connection and E-mail address)
Just add more If sReqdUsername = " if you have more Bots...
HaArD
Code: Select all
' By ¨'°º•¤Dazzle®¤•º°'¨ 2002
sub DataArival (curUser, sCurData) 'This event is fired when a user sends data to the hub. curUser is a DCUser object and sCurData is the data they sent.
If len(sCurData) > 0 Then
on error resume next
If Left(sCurData, 8) = "$GetINFO" Then
Dim sReqdUsername
sReqdUsername = Split(sCurData, " ", 3)(1)
If sReqdUsername = "STIMBOT" Then _
curUser.SendData CStr("$MyINFO $ALL "& sReqdUsername &" ® Stimbot:+commands™$ $BOT"& chr(9) & "$No E-mail$5370000000$|" )
If sReqdUsername = "OP•Chat" Then _
curUser.SendData CStr("$MyINFO $ALL "& sReqdUsername &" ® Stimbot OPS Chat ™$ $BOT"& chr(9) & "$No E-mail$5370000000$|" )
If sReqdUsername = "GeneralBot" Then _
curUser.SendData CStr("$MyINFO $ALL "& sReqdUsername &" ® Gadget:help ™$ $BOT"& chr(9) & "$No E-mail$5370000000$|" )
If sReqdUsername = "Odin" Then _
curUser.SendData CStr("$MyINFO $ALL "& sReqdUsername &" ® Stimbot Multihub Chat ™$ $BOT"& chr(9) & "$No E-mail$5370000000$|" )
End If
End If
End Sub
Which will populate the User list with all the fields.. (Nick, Shared, Description, Connection and E-mail address)
Just add more If sReqdUsername = " if you have more Bots...
HaArD
-
Paul_Don
- Posts: 146
- Joined: 2003-01-29 11:41
- Location: uk
-
ender
- Posts: 224
- Joined: 2003-01-03 22:47
HaArd: that won't work if the bot doesn't first appear in the userlist somehow. If you use RegisterBotName, the bot's nickname is automatically added to $NickList and $OpList, if you use $Hello <bot>, the bot's nickname appears in the userlist. No DC client will ever send a $GetINFO request for a user (bot) that doesn't appear in the userlist.
-
Sedulus
- Forum Moderator
- Posts: 687
- Joined: 2003-01-04 14:32
also reply with a $Hello on dataarrival of $GetNickList, otherwise the bot will disappear on refresh user listender wrote:Code: Select all
sub NewUserConnected(curUser)
curUser.SendData "$Hello <name_of_the_bot>"
end sub
http://dc.selwerd.nl/hublist.xml.bz2
http://www.b.ali.btinternet.co.uk/DCPlusPlus/index.html (TheParanoidOne's DC++ Guide)
http://www.dslreports.com/faq/dc (BSOD2600's Direct Connect FAQ)
http://www.b.ali.btinternet.co.uk/DCPlusPlus/index.html (TheParanoidOne's DC++ Guide)
http://www.dslreports.com/faq/dc (BSOD2600's Direct Connect FAQ)
Who is online
Users browsing this forum: Google [Bot] and 0 guests