Author Topic: news  (Read 4899 times)

clEEn

  • Newbie
  • *
  • Posts: 21
news
« on: October 02, 2008, 01:07:10 PM »
I got this news script by jakob but it only works on one channel, how i make it work to all channels?

Quote
Sub ONTEXT(Message,Channel,Nickname,Host,ServerNumber)
if LCase(Nickname) = "cleen" then
If Left(LCase(Message),5) = "!news" then
NewNews = mid(Message,6)
WriteIniFile "News.ini","News",Channel,NewNews
SendCommand "/msg " & Channel & " Done.",ServerNumber
End If
end if
End Sub
Sub StartNews()
SendCommand "/timer News 0 3600 /! ShowNews"
End Sub
Sub ShowNews()
Chan = GetIdentifier("$chan(1)")
NewsToShow = GetIniFile("News.ini","News",Chan,"No News")
SendCommand "/msg " & Chan & " " & NewsToShow
End Sub

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: news
« Reply #1 on: October 02, 2008, 02:53:10 PM »
Are you doing a '/! StartNews' inside each channel?
The IceChat God

Windows_95

  • Newbie
  • *
  • Posts: 31
  • Who's cool and has two thumbs? This guy!
Re: news
« Reply #2 on: October 02, 2008, 03:14:08 PM »
$chan(1) returns the first channel your in... i think
« Last Edit: October 02, 2008, 03:15:57 PM by Windows_95 »
I do not feel obliged to believe that the same God who has endowed us with sense, reason, and intellect has intended us to forgo their use. Galileo Galilei

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: news
« Reply #3 on: October 02, 2008, 04:58:29 PM »
Yes, thats the problem, and it can be replaced with the current channel, if he starts it in each channel, which is why I asked. 
The IceChat God

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: news
« Reply #4 on: October 04, 2008, 03:46:24 PM »
Are you no longer interested in this script?
The IceChat God

clEEn

  • Newbie
  • *
  • Posts: 21
Re: news
« Reply #5 on: October 05, 2008, 04:36:10 AM »
yes iam sry i didnt respons, thx guys.

clEEn

  • Newbie
  • *
  • Posts: 21
Re: news
« Reply #6 on: October 05, 2008, 04:37:58 AM »
$chan(1) returns the first channel your in... i think

So i just delete that $chan(1) ?

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: news
« Reply #7 on: October 05, 2008, 02:23:21 PM »
Just replacing it with $channel will return your current channel.
The IceChat God

clEEn

  • Newbie
  • *
  • Posts: 21
Re: news
« Reply #8 on: October 13, 2008, 06:40:08 AM »
Just replacing it with $channel will return your current channel.

When i do that it type news on ALL channels, BUT, it start with #channel <NEWSTEXT>.
Exempel: if bot is on #pcw it says this in chat: #pcw Bot powered by #channel"

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: news
« Reply #9 on: October 13, 2008, 02:17:07 PM »
No, thats not what I meant.
I meant under the ShowNews subroutine.
The IceChat God