dominikh changed the topic of #cinch to: The IRC Framework | Latest version: Cinch 2.3.1 | You're being logged at https://irclog.whitequark.org/cinch/
_whitelogger has joined #cinch
Azure|dc has joined #cinch
Azure has quit [Ping timeout: 260 seconds]
StockBot has joined #cinch
<StockBot>
Hey, Im trying to find a way to on :message, /^!notice (.+) do |m,term| and then have cinchbot notice the channel but I only want an Op to be able to perform this task... or other times where it may be an automated notice
<StockBot>
i can send to the channel normally, but im looking for the notice, where it sets off alerts/highlights
<StockBot>
Any help would be greatly appreciated
<StockBot>
Ok i figured out the notice part - m.channel.notice("#{term}")
<StockBot>
Now just need to figure out how to limit it to Ops only
<leftylink>
StockBot: yup, check out either Channel#opped? or Channel#ops
<StockBot>
ok so they can explain how to limit actionable commands to ops only
<StockBot>
thx
StockBot has quit [Ping timeout: 240 seconds]
craysiii has joined #cinch
StockBot has joined #cinch
<StockBot>
Is there any way to check is someone is an Op in an channel based on when they send a message with on :message ?
<StockBot>
right now im looking in m.user.data.dup
<StockBot>
but i did testing with it and the Op shows as false
<dominikh>
m.channel.op?(m.user) or something like that
<StockBot>
let me try that one
<dominikh>
odds are he's not op, then.
<StockBot>
Well he was Op but on a makeshift, nonregistered channel
<StockBot>
guess i can try on a chanserv registered one
<dominikh>
that is irrelevant
<StockBot>
ok
<dominikh>
was he actually opped at the time?
<StockBot>
yes
<dominikh>
op, not half op?
<StockBot>
full op
<StockBot>
Ah ok so pulling from m.channel.users it shows who is oppd
<StockBot>
so i need to do a foreach style loop on each oppd user and compare, if true then "ACTION"