Anope IRC Services

Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: Custom Channel/Nick Info Style!  (Read 3496 times)

0 Members and 1 Guest are viewing this topic.

Danyal Saleem

  • Anope User
  • Offline Offline
  • Posts: 2
Custom Channel/Nick Info Style!
« on: January 04, 2014, 07:35:48 PM »

Hello I Want Custom Nick/Channel Info Style If It's Possible!
Like:

/ns info Bones

-NickServ- Info for Bones:
-
-NickServ- Last seen address : ~Zar@127.0.0.1
-
-NickServ- Last seen time    : Tue 17-Dec-2013 19:25:52 GMT
-
-NickServ- Time registered   : Mon 09-Apr-2012 17:15:14 GMT
-
-NickServ- Time now          : Sat 04-Jan-2014 19:30:41 GMT
-
-NickServ- Options: NoOp, MailBlock
-
-NickServ- *** End of Info ***
-
and

 /cs info #Test

-ChanServ- Info for #test:
-
-ChanServ- Founder    : Monkey (wanted@thep0lice.net)
-
-ChanServ- Mode Lock  : +nts
-
-ChanServ- Description: Test Channel Only
-
-ChanServ- Options    : Ident, "Sticky" Topics
-
-ChanServ- Memo Level : AOP
-
-ChanServ- Registered : Wed 03-Jul-2013 17:36:39 GMT-ChanServ- Last opping: Sat 04-Jan-2014 17:28:43 GMT
-
-ChanServ- *** End of Info ***
-


Is It Possible Then Please Do It Please



Logged

Charles Kingsley

  • Contributor
  • *
  • Offline Offline
  • Posts: 1405
Re: Custom Channel/Nick Info Style!
« Reply #1 on: January 04, 2014, 07:38:32 PM »

What exactly is missing from the current /ns info and /cs info's that you are looking for?

They look very similar as it is ... (we include more info)
Logged

Charles Kingsley

  • Contributor
  • *
  • Offline Offline
  • Posts: 1405
Re: Custom Channel/Nick Info Style!
« Reply #2 on: January 04, 2014, 07:46:30 PM »

This isn't new to 2.0.

You're not making any sense at all.

Either answer my questions or don't.
Logged

katsklaw

  • Supporter
  • Anope User
  • Offline Offline
  • Posts: 537
Re: Custom Channel/Nick Info Style!
« Reply #3 on: January 04, 2014, 10:45:36 PM »

I think he's wanting customizable outputs which would allow admins to choose how the information is displayed to their users. I do this with my mIRC script by having separate template files and then populating them with the data as mIRC "plays" the file line by line back to the user.

Probably the easiest is to create a separate output file for each command as a plain txt file and have a function read and autofill the data as it's displayed to the user. This isn't a terrible idea but it'll likely have to wait for 2.1-dev. Other services packages in the past have done it, it's a shame it's not more commonplace today.

Example would be like ($INSTALLDIR/templates/ns/info):

Code: [Select]
Nick: %s Address: %s
Seen: %s
Donate %s to the Anope Team ASAP! ;)

I think the biggest headache though is this seems a lot like the old lang files nightmare from 1.6/.8 however with UTF-8/unicode being so popular maybe it can be made a bit more simple not to mention that the admin would then be responsible for coding changes .. *shrugs*.

cheers

EDIT: This will likely be more of a headache now that I think about it because you'd need to assign each data bit to a variable or array like %nick, %addr,%email .. etc then free that memory at the end of the function. That, however, wouldn't cover how 3rd party modules would interact. surely this output would use command hooks but it would also require said modules to also support the system to either TAIL into the output or HEAD in to replace it. Perhaps there is indeed a good reason packages don't support it any longer.
« Last Edit: January 04, 2014, 10:52:40 PM by katsklaw »
Logged
Pages: [1]   Go Up