scripts as regular users?

Which hub software is the best? Where can I find script XXX? Discuss it here...(no, this is not for advertising your hub...)

Moderator: Moderators

Phantom
Posts: 72
Joined: 2003-01-12 01:13
Location: New Zealand

scripts as regular users?

Post by Phantom » 2003-02-17 01:21

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?

Phantom
Posts: 72
Joined: 2003-01-12 01:13
Location: New Zealand

prev post

Post by Phantom » 2003-02-17 01:23

In vb script of course, but i'm also interested for LUA scripting for ptokax, but using the $MyInfo would apply to that aswell

Paul_Don
Posts: 146
Joined: 2003-01-29 11:41
Location: uk

Post by Paul_Don » 2003-02-17 01:33

if the bot didnt have op status wouldnt have the power to disconnect people then would it??

Phantom
Posts: 72
Joined: 2003-01-12 01:13
Location: New Zealand

bot

Post by Phantom » 2003-02-17 01:35

Thats not the point. I don't want bots like, for eg, Trivia bot, in the list of ops. I only use 1 bot for that sort of purpose, and the others clog up the op list.

ivulfusbar
Posts: 506
Joined: 2003-01-03 12:33

Post by ivulfusbar » 2003-02-17 07:20

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

Post by ender » 2003-02-17 08:42

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

Post by HaArD » 2003-02-17 12:33

Or you could use this:

Code: Select all

' By ¨'°º&#8226;¤Dazzle®¤&#8226;º°'¨ 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&#8482;$ $BOT"& chr(9) & "$No E-mail$5370000000$|" )
                If sReqdUsername = "OP&#8226;Chat" Then _
             curUser.SendData CStr("$MyINFO $ALL "& sReqdUsername &" ® Stimbot OPS Chat &#8482;$ $BOT"& chr(9) & "$No E-mail$5370000000$|" )
                If sReqdUsername = "GeneralBot" Then _
             curUser.SendData CStr("$MyINFO $ALL "& sReqdUsername &" ® Gadget:help &#8482;$ $BOT"& chr(9) & "$No E-mail$5370000000$|" )
                If sReqdUsername = "Odin" Then _
             curUser.SendData CStr("$MyINFO $ALL "& sReqdUsername &" ® Stimbot Multihub Chat &#8482;$ $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

Post by Paul_Don » 2003-02-17 14:45

jsut dont enter in a name for the bot adn it wont show on the hub at all but will trig when asked for

ender
Posts: 224
Joined: 2003-01-03 22:47

Post by ender » 2003-02-17 14:52

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

Post by Sedulus » 2003-02-17 15:25

ender wrote:

Code: Select all

sub NewUserConnected(curUser)
  curUser.SendData "$Hello <name_of_the_bot>"
end sub
also reply with a $Hello on dataarrival of $GetNickList, otherwise the bot will disappear on refresh user list
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)

Phantom
Posts: 72
Joined: 2003-01-12 01:13
Location: New Zealand

$hello

Post by Phantom » 2003-02-17 20:42

Thanks for that. I couldn't get the $MyInfo response to work too well, but the $Hello works a charm. Thanks.

Who is online

Users browsing this forum: Google [Bot] and 0 guests