Minor bug with router problem
-
deftonzs
- Posts: 18
- Joined: 2003-01-05 16:56
Minor bug with router problem
I have a router, and as the operator of the server i am set to *active*, but since i'm on a router it will report my ip as 192.168.1.1, and then i keep getting kicked from the server for not haveing my ip setup correctly, anyway to get around this?
is there an option to turn this on and off for ops? or something like that?
is there an option to turn this on and off for ops? or something like that?
-
deftonzs
- Posts: 18
- Joined: 2003-01-05 16:56
lua scripts
oh, and is there anyway to get the messages from the trig bots and such to show up after the person says the thing? it's kinda weird when it looks like this lol...
[16:48] <Trig> Oh no, PtokaX =(
[16:48] <test> ptokax
you would think it would come after the comment... oh well
if you could get that fixed it would be great...
btw i will be beta testing at deftonzs.com:411 with no lua scripts...
and deftonzs.com:1411 with lua scripts...
deftonzs.com:411 has about 100 users, and :1411 just has me
deftonzs
[16:48] <Trig> Oh no, PtokaX =(
[16:48] <test> ptokax
you would think it would come after the comment... oh well
if you could get that fixed it would be great...
btw i will be beta testing at deftonzs.com:411 with no lua scripts...
and deftonzs.com:1411 with lua scripts...
deftonzs.com:411 has about 100 users, and :1411 just has me
deftonzs
-
Sedulus
- Forum Moderator
- Posts: 687
- Joined: 2003-01-04 14:32
Re: lua scripts
deftonzs wrote:[16:48] <Trig> Oh no, PtokaX =(
[16:48] <test> ptokax
you would think it would come after the comment... oh well ;)
if you could get that fixed it would be great...
LuaScript.txt wrote:Consider the ClientMessage event that's
fired when somebody writes a message; if you want to write a bot that
says "hello" every time someone says "hi", the bot answer will be sent
before the hub sends out the message to the other clients, and therefore,
the order of the hello and hi will come out strange...keep it in mind...
(and use ACTION_HANDLED wisely to avoid bad situations)
I haven't played with this yet.. but I think you should do:
Code: Select all
hubMessage(incoming_msg, client:getNick())
hubMessage(trigged_msg, bot_name)
return ACTION_HANDLEDhttp://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)
-
deftonzs
- Posts: 18
- Joined: 2003-01-05 16:56
i tried what you just said and now all it does is reply to what i said... and not actually say what i say... :-/
[17:31] <Trig> See ya test
[17:31] <@DCH++> Scripts reloaded
[17:31] <@Trig> See ya test
[17:31] <@Trig> See ya test
[17:31] <@DCH++> Scripts reloaded
[17:31] <test> bye
[17:31] <test> fuck
[17:32] <@DCH++> Scripts reloaded
[17:32] <test> bye
[17:32] <test> bye
[17:32] <@DCH++> Scripts reloaded
[17:32] <@Trig> See ya test
[17:32] <@DCH++> Scripts reloaded
[17:32] <@Trig> See ya test
[17:32] <test> bye
see??
so i tried moving some stuff around but still, no apples
[17:31] <Trig> See ya test
[17:31] <@DCH++> Scripts reloaded
[17:31] <@Trig> See ya test
[17:31] <@Trig> See ya test
[17:31] <@DCH++> Scripts reloaded
[17:31] <test> bye
[17:31] <test> fuck
[17:32] <@DCH++> Scripts reloaded
[17:32] <test> bye
[17:32] <test> bye
[17:32] <@DCH++> Scripts reloaded
[17:32] <@Trig> See ya test
[17:32] <@DCH++> Scripts reloaded
[17:32] <@Trig> See ya test
[17:32] <test> bye
see??
so i tried moving some stuff around but still, no apples
-
Sedulus
- Forum Moderator
- Posts: 687
- Joined: 2003-01-04 14:32
Re: Minor bug with router problem
deftonzs wrote:I have a router, and as the operator of the server i am set to *active*, but since i'm on a router it will report my ip as 192.168.1.1, and then i keep getting kicked from the server for not haveing my ip setup correctly, anyway to get around this?
Code: Select all
function clientLine(client, msg)
if client:getNick() == "[Rug.nl]Sedulus" then
local ret,c,othernick
ret,c,othernick = string.find( msg, "^$ConnectToMe ([^ ]+) " )
if ret then
-- othernick.client:send( msg ) -- does not work!
sendToAll( msg ) -- should only be sent to <othernick> (but I don't know the function)
return ACTION_HANDLED
end
ret,c = string.find( msg, "^$Search " )
if ret then
sendToAll( msg )
return ACTION_HANDLED
end
end
endhttp://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)
-
arnetheduck
- The Creator Himself
- Posts: 296
- Joined: 2003-01-02 22:15
-
Sedulus
- Forum Moderator
- Posts: 687
- Joined: 2003-01-04 14:32
what the hell did you do?? it works...deftonzs wrote:i tried what you just said and now all it does is reply to what i said... and not actually say what i say... :-/
Code: Select all
--- /var/uploads/TrickerBot.lua 2003-01-30 20:31:06.000000000 +0100
+++ TrickerBot.lua 2003-02-05 02:46:28.000000000 +0100
@@ -26,8 +26,9 @@
for key, value in trigs do
if( string.find( string.lower(msg), key) ) then
answer, x = string.gsub(value, "%b[]", client:getNick())
+ hubMessage(msg, client:getNick())
hubMessage(answer, botname)
- break
+ return ACTION_HANDLED
end
end
endabout the hub-mass-message. that's a private message to all users. it needs all usernames. that is currently a waste of resources, since afaik there is no way to enumerate all users. so you'd have to store them all at login (see the PtokaX compatibility scripts).
just use hubMessage() for now..
(I appreciate that arne =) )
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)
-
deftonzs
- Posts: 18
- Joined: 2003-01-05 16:56
you have a different TrickerBot script then me then........
mine looks like this....
you have an extra
in there, i will cut and paste what you have and see if it works :-/
mine looks like this....
Code: Select all
function clientMessage(client, msg)
-- look in the table
for key, value in trigs do
if( string.find( string.lower(msg), key) ) then
answer, x = string.gsub(value, "%b[]", client:getNick()) -- Note; it's only called once...
hubMessage(answer, botname)
break
end
end
end
you have an extra
Code: Select all
+ hubMessage(msg, client:getNick())
in there, i will cut and paste what you have and see if it works :-/
-
Sedulus
- Forum Moderator
- Posts: 687
- Joined: 2003-01-04 14:32
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)
-
yakko
- Posts: 258
- Joined: 2003-01-27 06:04
Re: Minor bug with router problem
Sedulus wrote:Code: Select all
function clientLine(client, msg)
if client:getNick() == "[Rug.nl]Sedulus" then
local ret,c,othernick
ret,c,othernick = string.find( msg, "^$ConnectToMe ([^ ]+) " )
if ret then
-- othernick.client:send( msg ) -- does not work!
sendToAll( msg ) -- should only be sent to <othernick> (but I don't know the function)
return ACTION_HANDLED
end
ret,c = string.find( msg, "^$Search " )
if ret then
sendToAll( msg )
return ACTION_HANDLED
end
end
end
How exactly do we use this?
-
Sedulus
- Forum Moderator
- Posts: 687
- Joined: 2003-01-04 14:32
I fixed one thing...
now get it here:
http://wza.digitalbrains.com/DC/dchpp/NATusers.lua
* change my name(s) to yours
* add this to your LuaScript.xml and enter +reload
* questions? go to the dc++ dev lounge
now get it here:
http://wza.digitalbrains.com/DC/dchpp/NATusers.lua
* change my name(s) to yours
* add this to your LuaScript.xml and enter +reload
Code: Select all
<Context><!-- note the /, use \ for windows -->
<Script>scripts/NATusers.lua</Script>
</Context>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