| View previous topic :: View next topic |
| Author |
Message |
gembels Voice
Joined: 07 Jul 2012 Posts: 26
|
Posted: Wed Jun 19, 2013 9:40 pm Post subject: Help for return raw |
|
|
This what I got from mirc if I did /raw p gembels
| Code: |
[11:35] -server1- Hi, Your latency check for gembels is 2 ms.
-
[11:35] -server1- Server: server1
-
[11:35] -server1- Thu, 20 June 2013 08:35:39
-
[11:35] -server1- Modded by gembels
|
How to do like
| Code: |
bind pub - !ping ping_me
proc ping_me {nick uhost hand chan arg} {
putquick "PRIVMSG $chan :$arg ping $result"
}
|
How to grep the "2 ms" in eggdrop and do the "raw p" command
and how to set the $result ?
Thanks |
|
| Back to top |
|
 |
Madalin Master

Joined: 24 Jun 2005 Posts: 310 Location: Constanta, Romania
|
|
| Back to top |
|
 |
gembels Voice
Joined: 07 Jul 2012 Posts: 26
|
Posted: Thu Jun 20, 2013 6:28 pm Post subject: |
|
|
thanks Madalin, but this IRCD are bit different, there is no ctcr, the IRCD commands are bit different. To get a ping, the reply was not /ping $nick but /raw p $nick |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Thu Jun 20, 2013 6:46 pm Post subject: |
|
|
The /raw command in mIRC is merely used to send a string directly to the server without parsing; in eggdrops you use the puthelp, putserv, or putquick commands. So in your case, that part of the code would be something like this
| Code: | bind pub - !ping ping_me
proc ping_me {nick host handle channel text} {
puthelp "P $nick"
} |
You would still have to parse the response from the irc server, which is done using a binding. Exactly how to do this depends on what kind of message/command your irc server uses to send the response. If it is a server-notice, you're pretty much stuck with the RAW binding, which can be somewhat dangerous if you don't know what you are doing... _________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
gembels Voice
Joined: 07 Jul 2012 Posts: 26
|
Posted: Thu Jun 20, 2013 8:11 pm Post subject: |
|
|
| nml375 wrote: | The /raw command in mIRC is merely used to send a string directly to the server without parsing; in eggdrops you use the puthelp, putserv, or putquick commands. So in your case, that part of the code would be something like this
| Code: | bind pub - !ping ping_me
proc ping_me {nick host handle channel text} {
puthelp "P $nick"
} |
You would still have to parse the response from the irc server, which is done using a binding. Exactly how to do this depends on what kind of message/command your irc server uses to send the response. If it is a server-notice, you're pretty much stuck with the RAW binding, which can be somewhat dangerous if you don't know what you are doing... |
how to get var from puthelp "P $nick" ?
set result "puthelp \"P $nick\""
regxp ... $result
then I got the 2ms ? |
|
| Back to top |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Fri Jun 21, 2013 12:28 am Post subject: |
|
|
You need to catch the RAW response if you want that result. In mIRC do /debug @test then do that /raw p gembels and copy/paste what you see in the @test window. _________________ Once the game is over, the king and the pawn go back in the same box. |
|
| Back to top |
|
 |
gembels Voice
Joined: 07 Jul 2012 Posts: 26
|
Posted: Fri Jun 21, 2013 1:40 am Post subject: |
|
|
| caesar wrote: | | You need to catch the RAW response if you want that result. In mIRC do /debug @test then do that /raw p gembels and copy/paste what you see in the @test window. |
| Code: |
-> server1 p gembels
<- :server1 NOTICE dono :Hi, Your latency check for gembels is 37 ms.
<- :server1 NOTICE dono :Server: server1
<- :server1 NOTICE dono :Fri, 21 June 2013 12:38:09
<- :server1 NOTICE dono :Modded by gembels
|
dono is my nick
gembels is the person I ping.. |
|
| Back to top |
|
 |
|