Menu

A couple of questions for Joohn

Scripting
2003-02-07
2003-02-10
  • i have no name

    i have no name - 2003-02-07

    Hi Joohn,

    Of course i'm considering the v0.7.4 odch.

    1. I always wondered what the Flag was, in the odch::get_flag() user's function. Is it away / ready ?

    2. Is there a simple way to list the users a useable way, like an array or a list ? Or must i make one myself using *_connected and user_disconnected ? If not can we have one in the future ? (check with other users if they wants too).

    Thanx in advance.

     
    • Jonatan Nilsson

      Jonatan Nilsson - 2003-02-07

      1: Yes, the flag is a byte, sent with the $MyINFO command that is used to tell if a user is away/ready among other things. Information about which values that corresponds to what can be found at:
      http://umn.dl.sourceforge.net/sourceforge/opendcd/directconnect.txt

      2: Currently there isn't an easy way to retrieve a list, but it is a good suggestion for the future.

       
    • Stephen Leaf

      Stephen Leaf - 2003-02-07

      if possible it would be nice to have a function that would take a string "a" and output the user_t for user a

       
    • Robin Hill

      Robin Hill - 2003-02-07

      As far as getting a user list goes, I just read it in from ~/tmp/odchlist - it's not the cleanest way of doing things but it seems to work.  You need to read the whole thing in in one go (rather than one line at a time) otherwise the filehandle gets closed.

      Looking at the code, this seems to be exactly what the hub does when sending the nicklist anyway.

       
    • i have no name

      i have no name - 2003-02-10

      joohn : thx for the flag one ... i see what you're talking about as i also studied the DC protocol before i found ODCH.

      smileaf : it was necessary only before v0.7.4, as it now stores users by their names ... so your string "a" equals user_t.

      rob1n : thx a lot, i'll try that :)

       

Log in to post a comment.