![]() |
is OP or not
How to know if one Nick from IRC is @(OP) or not. This procedure:
Delphi-Quellcode:
is not work, be cause i`m not obtain this char '@' from AUser.Nick. Sorry for me english. :oops:
{ Return True if the string Nick is a channel operator. }
function TIdIRC.IsOp(ANick: String): Boolean; begin Result := (Length(Nick)>0) and (Nick[1] = '@'); {Do not Localize} end; |
Re: is OP or not
Code:
:wink:
[color=green]{ Return True if the string Nick is a channel operator. }[/color]
[b][color=darkblue]function[/color][/b] TIdIRC.IsOp([b]A[/b]Nick: [b][color=darkblue]String[/color][/b]): Boolean; [b][color=darkblue]begin[/color][/b] Result := (Length([b][color=#ff0000]A[/color][/b]Nick)>0) [b]and[/b] ([b][color=#ff0000]A[/color][/b]Nick[1] = '[color=blue]@[/color]'); [b][color=darkblue]end[/color];[/b] |
Re: is OP or not
Yes, thanks.But.. no..This function is work only if input text is: "@xxxxxx" but this '@' ? From where ? AUser.Nick ..return only nick.. :(
(Indy9 ..Delphi7 Eneterprise.) |
Re: is OP or not
I don't think this '@' will ever be present. It is only prepended to the nick by IRC clients to show the user the OP status of someone. I haven't got Indies installed right now, but there should be something explicit somewhere. ( Something like User.Status )
But I wonder why the method you showed is a member of TIdIRC... Was it there before or did you add it? Is it a callback function? I can't figure this out from here.... |
Re: is OP or not
I`m still waitting. :( :wall:
|
Re: is OP or not
Zitat:
DGL-Luke already told you (or better wrote) that he needs more info... |
Alle Zeitangaben in WEZ +1. Es ist jetzt 04:42 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz